Fix HTTP error handling callback

onerror uses the status code, not the full status message