Commit 08371b59 authored by tom's avatar tom

status code field name fix

parent d4cc9510
...@@ -3,9 +3,9 @@ import getErrorObj from './getErrorObj'; ...@@ -3,9 +3,9 @@ import getErrorObj from './getErrorObj';
export default function getErrorObjStatusCode(error: unknown) { export default function getErrorObjStatusCode(error: unknown) {
const errorObj = getErrorObj(error); const errorObj = getErrorObj(error);
if (!errorObj || !('statusCode' in errorObj) || typeof errorObj.statusCode !== 'number') { if (!errorObj || !('status' in errorObj) || typeof errorObj.status !== 'number') {
return; return;
} }
return errorObj.statusCode; return errorObj.status;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment