HTTP/1.1 403 UNAUTHORIZED
{
"error": {
"status": "UNAUTHORIZED",
"message": "Unauthorized access",
},
}
I would separate the status from the HTTP status.
- The HTTP status is great for reasonable default behaviours from clients.
- The application status can be used for adding more specific errors. (Is the access token expired, is your account blocked, is your organization blocked)
Even if you don’t need the status now, it is nice to have it if you want to add it in the future.
You can use a string or an integer as the status code, string is probably a bit more convenient for easy readability.
The message should be something that could be sent directly to the user, but mostly helpful to developers.
Must be because Factorio released 2.0 and the Space Age DLC recently.