diff --git a/lib/Github/HttpClient/Listener/ErrorListener.php b/lib/Github/HttpClient/Listener/ErrorListener.php index 49b144883cb..1d537240900 100644 --- a/lib/Github/HttpClient/Listener/ErrorListener.php +++ b/lib/Github/HttpClient/Listener/ErrorListener.php @@ -71,10 +71,14 @@ public function postSend(RequestInterface $request, MessageInterface $response) $errors[] = sprintf('Field "%s" already exists, for resource "%s"', $error['field'], $error['resource']); break; + default: + $errors[] = $error['message']; + break; + } } - throw new ValidationFailedException('Validation Failed:' . implode(', ', $errors), 422); + throw new ValidationFailedException('Validation Failed: ' . implode(', ', $errors), 422); } }