fix(core): update
This commit is contained in:
parent
acbe290526
commit
df430fa033
@ -6,7 +6,13 @@ export class HttpStatus {
|
||||
HttpStatus.statusMap[statusStringArg] = statusArg;
|
||||
}
|
||||
public static getHttpStatusByString(codeStringArg: string): HttpStatus {
|
||||
const statusInstance = new HttpStatus.statusMap[codeStringArg]();
|
||||
let statusInstance: HttpStatus;
|
||||
try {
|
||||
statusInstance = new HttpStatus.statusMap[codeStringArg]();
|
||||
} catch {
|
||||
console.log('unknown status')
|
||||
return null;
|
||||
}
|
||||
return statusInstance;
|
||||
}
|
||||
public code: number;
|
||||
|
Loading…
Reference in New Issue
Block a user