-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
@@ -72,7 +72,7 @@ public function onKernelException(GetResponseForExceptionEvent $event) | |||
} else { | |||
switch (substr($code, 0, 1)) { | |||
case '4': | |||
$message = 'Input Error'; | |||
$message = $exception->getMessage(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of exposing exception messages by default. An option could be to allow this conditionally, using an injected flag (which could for example be set to the value of kernel.debug).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're probably looking for this: #27. If you check the exception type (should be InvalidParametersException), I guess getMessage()
would be acceptable, even in prod
.
I think 'instanceof' (and a |
sure. I`ll do it a bit latter |
Note that the 3.0 is going to have comprehensive validation error feedback, see #51. That'll take some time though, probably a couple of weeks. If you fix the build checks I will merge this to master and create a new 2.2.x release, if you don't want to wait. Otherwise I will close this. |
Christmas came early: https://github.com/kleijnweb/swagger-bundle/releases/tag/v3.0.0 |
No description provided.