export default class MyError extends Error { status : number ; errors : any [ ] | undefined ; details ? : unknown ; param message param status param errors constructor ( message , status ? , errors ? ) { super ( message + ` &>${ status || '' }` ) ; this . status = typeof status === 'number' ? status : 0 ; this . errors = errors ; } }