projects
/
pharext
/
pharext.org
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
add logging; fix caching
[pharext/pharext.org]
/
app
/
Github
/
Exception
/
RequestException.php
diff --git
a/app/Github/Exception/RequestException.php
b/app/Github/Exception/RequestException.php
index 49ea1ae72f9a5db3fa805299cb48b732bfb886e9..c0a3d33c71524b3438dc7528759460763d839c6d 100644
(file)
--- a/
app/Github/Exception/RequestException.php
+++ b/
app/Github/Exception/RequestException.php
@@
-47,10
+47,15
@@
class RequestException extends \Exception implements Exception
$errors = "JSON errors:\n";
foreach ($this->errors as $error) {
$errors = "JSON errors:\n";
foreach ($this->errors as $error) {
- $errors .= sprintf($reasons[$error->code], $error->resource, $error->field);
+ if ($error->code === "custom") {
+ $errors .= $error->message . "\n";
+ } else {
+ $errors .= sprintf($reasons[$error->code], $error->resource, $error->field);
+ }
}
return $errors;
}
}
return $errors;
}
+
function __toString() {
return parent::__toString() . "\n". $this->getErrorsAsString();
}
function __toString() {
return parent::__toString() . "\n". $this->getErrorsAsString();
}