-
Notifications
You must be signed in to change notification settings - Fork 34
Error handling prettyfied #253
Comments
About notifications enhancements, we shall add:
|
What we also need is to define single JSON envelope for errors and decide how are we handling error codes. I strongly encourage to use HTTP codes, but I guess we shall also add internal codes for which we can provide human-readable translations. I guess we could also add a
but simple Also with dev=true we could add possibility to click on notification to open modal with full error description, formatted in pretty way. |
NOTE: following issue relates to this task too: #223 |
My proposal is to fit something like this:
|
Hi @cadavre , basically i agree with you... but i have to deep a bit more.
wdyt? |
In 1st document you can find a list of errors. If any of you have something about errors to add – write it here and I'll rewrite to first post. Another thing to add would be well-designed error pages, for example for 404 error. @teosarca sure we can preserve them. One question: do you need them in root of JSON response or can we wrap it into "java" leaf? Or maybe you'd like to keep single error responses in Swing and frontend?
I think above would be acceptable too. |
What i want to add, in addition to #223 issue too, we have to handle errors in widget in one generic way (and surely it should be dropdown - because it is not always visible, and for now there are only items) Long time ago, we developped state for corrupted inputs: It is already implemented, we can add error message for that, under the input. What i want to say, user inputs errors, should be consistent for all of inputs. And we should not varying them. |
Second case, is that we cannot catch each 404 and display it in generic way - because 404 is more about context of entity, and sometimes user should be notified. So, we have to make assumption about handling 404:
|
@damianprzygodzki I guess it won't be possible for API to decide how UI error shall be presented. Actually I can imagine situation where one API call gives you good data but another failed for some reason (i.e. to generate breadcrumb) – they both may generate 404's. |
I added some solution suggestions in 1st post. |
Closing because two things are left:
Splitting into separate issues. |
We're deep into project and I think it's final time to think about proper error handling across the system. We have different types of errors: server errors, errors generated by bad user input, instant errors provided when user action in not possible to accomplish or errors that are caused by lack of relations (like between BPartner, Pricing system and Product adding into Sales order)...
What we'd like to cover here is mostly ALL types of errors, when they happen, where should we display them and how we should display them.
It's also about UI enhancements to make error reading more user-friendly.
Error types
Global errors
Entered URL could not be resolved due to not found 404 of one of entities. I.e. /window/143/12345 – if 143 or 12345 are not found.
Solution: define "main" API calls that must be non-error to display particular page. If any failed = display connected whole-page error. That may mean this i.e. /layout and /data would be marked as main and if any of this calls fail with i.e. 404 – we will display generic 404 page.
Context errors
Lookup or Dropdown widget's loading of data caused error.
Solution: Display lookup errors from
/typeahead
calls into info container that is part of lookup (one that now displays "There are no results"). But! specify additional color (red) that indicated it is error text.Phrase entered in Lookup is not valid. (relates to #223)
&&
Value entered in input (text, number etc.) widget is not valid.
Solution: We shall introduce input-context errors and display them next to particular input, with marking this input red (as below mentioned by @ damianprzygodzki ).
Will be solved by #446 .
The text was updated successfully, but these errors were encountered: