bugfix(common): fix breaking change on http exception

This commit is contained in:
Konrad Cerny
2019-04-10 11:34:04 +02:00
parent 098eb3b4f6
commit 547615afd7
2 changed files with 44 additions and 5 deletions

View File

@@ -1,5 +1,3 @@
import { isObject } from '../utils/shared.utils';
export class HttpException extends Error {
public readonly message: any;
@@ -22,9 +20,7 @@ export class HttpException extends Error {
private readonly status: number,
) {
super();
this.message =
(isObject(response) && (response as { message?: string }).message) ||
response;
this.message = response;
}
public getResponse(): string | object {