class param { string } message param { number } statusCode returns class ErrorHandler extends Error { statusCode : number ; constructor ( message , statusCode ) { super ( message ) ; this . statusCode = statusCode ; Error . captureStackTrace ( this , this . constructor ) ; } } export default ErrorHandler ;