Fixed incorrect response code in error response

All error responses had a HTTP status code of 200 when they were supposed to use the specified code in the parameters.

This is now fixed.