on 2024 Dec 30 2:02 PM - last edited a month ago
When using the Service Layer to post, for example, an order, I receive detailed error messages similar to what is displayed in the SAP Business One (SBO) client if something is not correct.
Now, I’m trying to migrate to the API Gateway to leverage new resources like reports. However, I’ve encountered an issue with error handling. In case of an error, I only receive a "503 Service Unavailable" response code, accompanied by the following response body:
{"code":503,"message": "Internal Server Error resulted from Runtime Exception"}
And it's the same for any endpoint or any kind of error.
How can I get more meaningful error messages when using the API Gateway, similar to what is provided by the Service Layer?
EDIT:
This is a postman example of error call to POST an order using Service Layer, with a clear error response with the message "Invalid BP code...":
Same request to POST an incorrect order through API Gateway, using an API Gateway login token and same endpoint as before but using differen port, gives a 500 Internal Server Error with a generic body content, no matter what error I get.
Important to say that when I POST a correct json order I get the exact same json response using both APIs.
Request clarification before answering.
Hi anrodse,
Please be aware that the Service Layer and API Gateway are two distinct entities.
Presently, the API Gateway is designed specifically to offer access to Crystal Reports as a service. It is not designed to handle the posting of transactions, such as Sales Orders or other types of transactions.
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
120 | |
9 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.