Skip to content

Commit a4d144f

Browse files
committed
Register the exception, not the message
- Since getDetail() will introspect the exception to determine whether or not to display just the message or also include the stack trace, pass the exception in.
1 parent c518e0e commit a4d144f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ZF/ApiProblem/Listener/ApiProblemListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ public function onDispatchError(MvcEvent $e)
164164
if (0 === $status) {
165165
$status = 500;
166166
}
167-
$detail = $exception->getMessage();
168-
$problem = new ApiProblem($status, $detail);
167+
$problem = new ApiProblem($status, $exception);
169168
} else {
170169
// If it's not an exception, do not know what to do.
171170
return;

0 commit comments

Comments
 (0)