From ebfd594231631e975c2245ae9bf3192a5a532022 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Wed, 13 Nov 2019 15:46:04 -0500 Subject: [PATCH] Returns default error message --- src/app/_services/api/api.service.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/_services/api/api.service.ts b/src/app/_services/api/api.service.ts index 5eaa402..4cc6ff0 100644 --- a/src/app/_services/api/api.service.ts +++ b/src/app/_services/api/api.service.ts @@ -92,10 +92,7 @@ export class ApiService { } private _handleError(error: ApiError) { - let message = 'Could not complete your request; please try again later.'; - message = error.message; - // return an observable with a user-facing error message - return throwError(message); + return throwError(error.message || 'Could not complete your request; please try again later.'); } private _endpointUrl(endpointName: string): string {