During load testing of npm package metadata requests, in rare cases it was noticed that NXRM may return a HTTP status code of 200 and a response body indicating an error:
It is expected an HTTP error code be returned instead ( ie. 4xx, 5xx ), if there is a problem properly returning the response asked for by the client.
It is believed that the NPM format protocols for the npm client do not normally anticipate a 200 status code response with a body payload that indicates an error on the server.
A concern is a less forgiving npm client may interpret the 200 success status code as a true success, and store the error body as the actual payload.
A request is made to a package, we attempt to decrease memory utilization by sending a response and wait for the requester to stream out the actual bytes. When setting up the request and response, we are giving the handler that does the actually streaming out of the response a Missing Blob handler. Meaning if we have already started streaming out bytes and found the blob to be missing during this operation - it is too late to start over with response headers - so an error body is sent instead of the requested content.