update error message to include status code