-
Notifications
You must be signed in to change notification settings - Fork 156
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
Feature Request: Improved Error Details #367
Comments
Thanks for this feature request, makes sense. This will require some (breaking) changes in Structr, so it will probably wait until v2.0 (but 2.0 will perhaps be earlier than expected). |
I'm currently working on an improvement of the structure of semantic error messages. The intended purpose was to provide machine-readable error messages that can be parsed easily. The current implementation obviously doesn't reach this goal, so I propose a new structure for semantic error messages. The proposed structure has just two levels, and a very simple error object with four fields:
some examples
What do you think? Everyone that uses the current implementation of semantic error messages, please provide feedback about the amount of changes that would be necessary on your side to implement the new model. Thank you! |
I like it a lot! Couple of questions
|
|
|
I'm not sure whether the ID can be included in all cases, but it definitely seems to be a good idea! Thank you for your valuable input! |
Any chance there is a an update on the new implementation? I am looking to move to production soon and the inability to effectively detect and react to errors is rather problematic (I am trying not to resort to regex to figure out what happened in the back end 😄) |
The changes are part of a larger refactoring / upgrade which is available in the |
I am currently using build 87. Is it a simple swamp (build and replace)? If so, I'd be more than happy to give it a try. |
The new error messages format are in the master branch now, but have not yet released a new snapshot containing these. |
This is awesome news! Is it pretty safe to do a build and upgrade? |
Yes, it's pretty stable. |
Just a quick update -- I am running a build off the source and while I see the new error structure I have noticed that about 90% of the time the error result is blank. I get either a 400 or a 500 error code with nothing in the error collection. Update: Here is a post on the google groups about the issue: https://groups.google.com/forum/#!topic/structr/rGYvOF3dEfk |
Any update to this -- the number of times structr returns a blank error is rather significant which makes troubleshooting extremely difficult. |
Please consider increase the error logging. A majority of the instances where an error occurs there is both no details and nothing written to the log files. Examples:
Basically almost all 400 and 500 errors have no details in both the response and in the structr log file. |
|
Closing this issue since the initial feature request ("improve error response format") is implemented. Increasing the verbosity of error messages is a different issue and can be tracked with issue #413. |
The current error response looks like this
This information is relatively easy to read from a human perspective :) That said, it seems to be very difficult to parse consistently from a system perspective as much of it is dynamic and changes based on the error. It would be great if we could restructure the error message to be easier to handle from a system perspective
As a possible recommendation, what do you think of this?
or even better something like (this handles multiple "details")
Original thread: https://groups.google.com/forum/#!topic/structr/EXcXwuxZW0U
The text was updated successfully, but these errors were encountered: