Originally posted by **PBharose** March 10, 2023
# HTTP Status codes and standard responses
| Response Code | Description |
| ----------- | ----------- |
| 200 (Ok) | Request has been successfully processed |
| 201 (Created) | Request has been successful and a new resource has been created |
| 202 (Accepted) | The request has been accepted, but the processing has not been completed |
| 400 (Bad Request) | Invalid request supplied |
| 401 (Unauthorized) | Authentication has either failed or not been supplied |
| 403 (Forbidden) | Authorization to the requested resource has failed |
| 404 (Not Found) | The request resource could not be found |
| 500 (Internal Server Error) | An unexpected error occurred |
### Error responses should follow the following standard:
```json
{
"errorCode": "Unique error code: e.g. P2M0001",
"errorMessage": "Human readable error message here - clients can display this to the user",
"correlationId": "ID of the request - clients should display this for tracking purposes"
}
```
Discussed in https://github.com/PBharose/NodeJS-Assignment/discussions/5