5XX codes should be used for stuff like... github backend is down, mysql server connection failed, etc. Usually something unexpected and catastrophic. A bad request shouldn't throw this error. 5XX are server errors.
An error in this case should be a 4XX (client error).
I monitor my services for 5XX errors to detect if something is acting up, and caught these (unknown platform, unknown version, etc). I modified Nuts to respond with 400 Bad Request in these cases.
For example, when no platform is specified: https://github.com/GitbookIO/nuts/blob/master/lib/nuts.js#L150
5XX codes should be used for stuff like... github backend is down, mysql server connection failed, etc. Usually something unexpected and catastrophic. A bad request shouldn't throw this error. 5XX are server errors.
An error in this case should be a 4XX (client error).
I monitor my services for 5XX errors to detect if something is acting up, and caught these (unknown platform, unknown version, etc). I modified Nuts to respond with 400 Bad Request in these cases.