Extracts the HTTP status code from an unknown error object.
This function checks multiple common locations where status codes may be stored:
error.status
error.statusCode
error.response.status
error.body.status
The unknown error to extract the status code from
The HTTP status code if found, otherwise undefined
undefined
Extracts the HTTP status code from an unknown error object.
This function checks multiple common locations where status codes may be stored:
error.statuserror.statusCodeerror.response.statuserror.body.status