From cbbf90f6f15de2d462f21a0e68fdccd107bf8989 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Thu, 19 Aug 2021 18:42:52 +0200 Subject: [PATCH] fix(core): update --- ts/smartstatus.classes.http.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ts/smartstatus.classes.http.ts b/ts/smartstatus.classes.http.ts index bf8eeef..533e5b3 100644 --- a/ts/smartstatus.classes.http.ts +++ b/ts/smartstatus.classes.http.ts @@ -11,7 +11,11 @@ export class HttpStatus { statusInstance = new HttpStatus.statusMap[codeStringArg](); } catch { console.log('unknown status') - return null; + return new HttpStatus({ + code: 0, + text: 'unknown status', + description: `The status ${codeStringArg} is not known.` + }); } return statusInstance; }