Q:

What HTTP status code should I use for processing status update?

I am building an application that sends a set of images to a custom server for processing. The processing can take up to several minutes, so I am implementing a progress bar in the app. The progress bar is updated via an http get request that returns a JSON object containing either an error message, the status of the processing, or the results of the processing.
Upon a successful upload (via put request) the server responds with a status of 202 Accepted.
The HTTP request responds with a status of 500 Internal Server Error if an error has occurred, 102 Processing if the processing has not completed, and 200 Ok if the processing is done and the results are available.
When I am testing in postman the content of the message when a 102 Processing status is returned is hidden, leading me to believe I am misunderstanding something about which codes I should be using. Do the HTTP codes I am using in these scenarios make sense or should I be using other codes?
Thank you

A:

102 Processing is not a "normal" status code. Like the others in the 100 series, they act more like an 'intermediate' status code.
When a server sends 102 or 10x, it means that the client will continue to wait for a 'real' status code. So an actual single HTTP request might result in all of the following HTTP status codes:

100
102
102 (might appear more than once)
103
103
200 (finally got the real 'OK').

Your use-case is not an appropiate usage of 102, unless you keep the connection open and send more status-codes. Many HTTP clients don't have a built-in way to notify you of these 'intermediate statuses', but some do.
Given that you're doing a sort of polling and you have a resource that represents 'the status of the image' (I'm imagining something like /image/{upload-id}/status it's fine for that resource to return 200 OK both when the image has and has not been processed.
Think about it this way, regardless of the image itself, the 'status of the image'-resource is always available and can return 200. 
Plug: I wrote a blog post about this code.

