What is the difference between HTTP 404 and HTTP 500 status codes in Appian integrations?
What is the difference between HTTP 404 and HTTP 500 status codes in Appian integrations?
Answer
When an Appian integration object calls an external REST API, the HTTP status code tells you whether the request succeeded or failed. A 404 and a 500 point to different kinds of problems.
404 Not Found
The server can’t find the requested resource or endpoint. Common causes:
- The API URL or endpoint is wrong.
- The resource doesn’t exist, was deleted, or was moved.
- The HTTP method or routing configuration is wrong.
- In some APIs, access permissions are missing.
For example, if Appian calls GET /api/customers/999 and customer 999 doesn’t exist, the API may return a 404.
To troubleshoot, verify the URL and HTTP method, check that the resource exists, and validate the request parameters and permissions.
500 Internal Server Error
The server hit an unexpected problem while processing the request. Common causes:
- Unhandled exceptions in backend code.
- Database connection failures.
- Server configuration issues.
- Errors in backend business logic.
- Failures in dependent services.
For example, if Appian calls GET /api/customers/123, the endpoint exists, but the backend can’t connect to its database and returns a 500.
To troubleshoot, read the response body for error details, review the backend logs, check database connectivity and dependent services, and involve the API team if needed.
How Appian handles these errors
By default, an integration object treats HTTP error responses such as 404 and 500 as integration failures. The response exposes three fields:
successtells you whether the integration succeeded.result.statusCodeholds the HTTP status code, when available.error.messageholds the integration error message.
Sample Screenshot How Appan shows the status codes
You can configure custom error handling in the integration object so users see meaningful messages.
If you’re calling an Appian Web API, a 404 can also mean the caller lacks Web API permissions, and a 500 can mean the Web API expression failed to evaluate.
Interview answer
Say that a 404 usually points to a resource or endpoint problem, and a 500 to a server-side processing problem. Then add that you’d inspect the response and logs before naming a root cause.
Offical Appain Docs Ref:
https://docs.appian.com/suite/help/26.9/Integration_Tutorial.html
Check yourself
Question 1 of 3, on what the answer above covers.
- 1.Your integration object calls GET /api/customers/999 and returns a 404. The same URL pattern works fine for customer 123. What is the most likely cause?
- 2.An integration returns a 500 on GET /api/customers/123. The endpoint is correct and the customer exists. What should you do first?
- 3.You want to show users a friendly message when an integration call fails, and log the HTTP status. Which pair of integration response fields would you use?