Details
Description
There appears to be a problem with the OFBiz error-handling mechanism when creating an entity using an exported service. Initially, if incorrect input data is provided, OFBiz correctly returns a meaningful error message from the backend. However, upon resubmitting the same request without any changes, instead of returning the same meaningful error, the system responds with a 500 internal server error and an HTML response.
Interestingly, when OFBiz is restarted, the first request with the same incorrect data again returns a proper, meaningful error message. But all subsequent requests with the same data continue to produce a 500 response, which is not ideal for consistent error reporting.
This issue impacts debugging and error handling for services that rely on accurate back-end responses. The expected behavior would be to consistently return the meaningful error for all requests, regardless of whether OFBiz has been restarted.