Depending on what you mean by "made the backend explode", that is a server error, so 500 is correct!
Bad input should be a 4xx, but if the server can't cope with it, that's still a 5xx.