Comments (6)
Thanks for the report. Currently ResponseBuilder returns full exception's class name if and only if there's no exception message provided. Returning class name while not really useful for end user is still better than returning empty string. In case of abort the method signature is:
public function abort($code, $message = '', array $headers = [])
and that's why gets returned as you saw. However I think I can improve this return original HTTP error description instead, which would be actually pretty nice improvement and quick fix and I will add that. Thanks
from laravel-api-response-builder.
from laravel-api-response-builder.
That's valid note. Can you please create bug report for this?
from laravel-api-response-builder.
Please take a look a this branch: better-http-ex-msg - the configuration for ExceptionHandlerHelper
changed a bit but now one can easily configure any HTTP error code as he like. Default config is here and you can override everything in your own config.
from laravel-api-response-builder.
This code is now in the v6.4-dev branch if you want to play with it. It will be in 6.4 release. Please play with it and give some feedback before it goes officially out.
from laravel-api-response-builder.
Closing as fixed.
from laravel-api-response-builder.
Related Issues (20)
- ExceptionHandlerHelper::render should accept Throwable as second argument.
- ExceptionHandlerHelper::render() should Accept Throwable as second argument. HOT 2
- Response builder is not working with Laravel resource and resource collection HOT 7
- Will docs publish at a website? HOT 1
- DefaultExceptionHandler should accept \Throwable as a second argument HOT 1
- Exceptionhandler cannot use custom MyResponseBuilder HOT 2
- How to use with resource collection HOT 2
- Cannot configure a converter key as NULL HOT 5
- Setting status code for the response. HOT 7
- Logo's texts should be converted to paths
- Exception Handler is not working HOT 2
- "Undefined array key" for ex handler config lacking i.e. api_code entry. HOT 3
- errors key for validation HOT 1
- No data conversion mapping configured for custom class. HOT 4
- Custom key for Exceptions HOT 1
- Undefined array key "handler" HOT 2
- Update to Laravel 10? HOT 3
- Exception handler - Incorrect documentation HOT 1
- How does ExceptionHandlerHelper return information in a custom format? HOT 1
- Support Laravel 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-api-response-builder.