Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement error response messages on chosen Plant classes #1322

Open
paperscissors opened this issue Aug 10, 2018 · 0 comments
Open

Implement error response messages on chosen Plant classes #1322

paperscissors opened this issue Aug 10, 2018 · 0 comments

Comments

@paperscissors
Copy link
Contributor

Doing a review of what I left hanging the last few times I made passes on the Platform code. One thing sticks out to me because it may actually help troubleshoot a thing or two on staging.

So historically the Platform kind of works as an API even when you're using requests locally. One of the biggest things that is a huge impediment in terms of development and troubleshooting is the lack of verbosity in errors.

There was no way originally to pass an actual error message and define the error code (404, 405, 500, etc), so at some point I setup a little method chaining facade that does that.

It would be a huge undertaking to put these verbose error messages everywhere out the gate, but I'm thinking: why not work them into places in the platform we're currently trying to troubleshoot on staging?

It's a pretty simple and non-glamorous thing out the gate; it's essentially changing spots in the Plant classes that return false with a more verbose sort of error, like

return $this->error('404')->message("No subscription plans found.");

I only really put together the functionality and cascade down to the API response, I haven't had time to really start putting these in place though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants