HTTP error codes end up in JSON

If I call, for example a plugin URI that doesn't exist (e.g. api/v1/plugin/autofocus/autofocus instead of api/v1/plugin/default/autofocus/autofocus), what I get is a response with an HTTP return code of 200 that contains a JSON payload with a return code of 404 as one of the elements. This probably wants to be the actual HTTP return code because that would be clearer.