Error handling

I am getting the following feedback : --------------------------- Platform Feedback Below ---------------------------- Some customers reported that the service is returning client errors that break their retry logic: 400 is an unexpected status code SRE Says: your solution is not working well enough to be promoted to production the requirement says I need to: GET /company?id=XX&country_iso=YY. This API endpoint receives the parameters id and country_iso. id can be a string without any particular limitation. country_iso will be a two-letter country code to select the backend according to the application configuration. Your solution must query the backend in a proper country and return: - An HTTP 200/OK reply when the company with the requested id exists on the corresponding backend. The body should be a JSON object with the company data returned by a backend. - An HTTP 404/Not Found reply if the company with the requested id does not exist on the corresponding backend. Im not sure where im going wrong in my error handling. Any help or advice would be appreciated
7 Replies
JavaBot
JavaBot•7d ago
⌛ This post has been reserved for your question.
Hey @🔟! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Peter Rader
Peter Rader•7d ago
What JDK?
🔟
🔟OP•7d ago
JDK 17
Peter Rader
Peter Rader•7d ago
🔟
🔟OP•7d ago
I havent yet, let me try that. Thank you
JavaBot
JavaBot•7d ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
JavaBot
JavaBot•7d ago
Post Closed
This post has been closed by <@1305556207431585894>.

Did you find this page helpful?