mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
12 lines
276 B
TypeScript
12 lines
276 B
TypeScript
import getErrorObj from './getErrorObj';
|
|
|
|
export default function getErrorObjStatusCode(error: unknown) {
|
|
const errorObj = getErrorObj(error);
|
|
|
|
if (!errorObj || !('status' in errorObj) || typeof errorObj.status !== 'number') {
|
|
return;
|
|
}
|
|
|
|
return errorObj.status;
|
|
}
|