import { IError } from '@interfaces' ; description param error returns const getErrorStatusCode = ( error ) : number => { if ( typeof ( error . statusCode ) !== 'undefined' ) return error . statusCode ; if ( typeof ( error . status ) !== 'undefined' ) return error . status ; if ( typeof ( error ?. output ?. statusCode ) !== 'undefined' ) return error . output . statusCode ; return 500 ; } ; export { getErrorStatusCode } ;