HTTP 500 error code returned from APIs

Hi,

This is about graphQl APIs which is returning HTTP 500 error when invalid or non-existing ID is passed in the query.
For E.g.

mutation { archive_item (item_id: 123) { id }}

Here item_id is non-existing and it returns me below 500 error.

{"error_message":"Internal server error","status_code":500}

This is not same for all APIs.

For retrieve groups if I provide invalid ID it return me empty array
Query:

query { boards (ids: 123) { groups (ids: topics){ id title color position deleted items {id}}}}

Result:

{
    "data": {
        "boards": []
    },
    "account_id": 11771408
}

Is it possible to have consistent response in all the cases.

Hello @Yash!

Thank you for that feedback :slightly_smiling_face:

I will share it with our team so that it can be reviewed.

Cheers,
Matias

In general, only the website administrator can solve most 500 errors because they are rooted in the software on the server. But sometimes, the problem can be at the user’s end of the connection. If you run into a 500 internal server error, you might want to try a few troubleshooting steps to see if the problem can be resolved.

Close the browser or restart your computer. This is relatively easy to try, so it should be your first line of troubleshooting: Close the web browser and then restart it to see if that solves the problem. You can also turn the computer off and back on again as well.
See if the site is down. Visit Downdetector and search for the website to see if it’s online. Downdetector doesn’t track smaller websites, so you can also try Down for Everyone or Just Me.
Wait a while. Because the 500 error is almost certainly taking place at the website’s server, you can assume the website administrator is working to resolve the problem. If it’s a large, popular website, odds are good that technicians are scrambling to resolve the problem as quickly as possible; a smaller website might take longer. Either way, wait a few minutes (or hours) and try again.
Delete your cache and cookies. If the site appears to be up but you can’t reach it, try to clear your browser cache and cookies.

Regards,
Rachel Gomez