You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
example use case
the frontend developer has the task to make an app for requests, he doesn't know detail about which fields are mandatory, so he sends a request method POST with the missing field they are mandatory in the backend.
Backend report SQL error on insert - and return 500 http status code without any valuable information
awaited behavior
REST API validate in this case mandatory logic and return instead HTTP status code 500 => HTTP status code 400 Bad Request. Response Body must include in login language - Error eg. Summary Field is Mandatory.
This can be applied to other logics like field format (eg,. phone validation), field type string vs numeric, etc.
FOR Me looks really important this topic, because we implemented a middleware in a customer project, where our vendor has no information about errors and we need each error to ask by email...etc.
Need meeting in MatterMost, what is our possibilities and time plan.
The text was updated successfully, but these errors were encountered:
I created a new IdempiereRestException class to handle this things, you can go ahead and improve the cases that you know are failing, the exception receives two parameters (errorMessage, Error status)
example use case
the frontend developer has the task to make an app for requests, he doesn't know detail about which fields are mandatory, so he sends a request method POST with the missing field they are mandatory in the backend.
Backend report SQL error on insert - and return 500 http status code without any valuable information
awaited behavior
REST API validate in this case mandatory logic and return instead HTTP status code 500 => HTTP status code 400 Bad Request. Response Body must include in login language - Error eg. Summary Field is Mandatory.
This can be applied to other logics like field format (eg,. phone validation), field type string vs numeric, etc.
FOR Me looks really important this topic, because we implemented a middleware in a customer project, where our vendor has no information about errors and we need each error to ask by email...etc.
Need meeting in MatterMost, what is our possibilities and time plan.
The text was updated successfully, but these errors were encountered: