Allow APIError to record HTTP response code.