aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/rest/rest-extractor.service.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/app/shared/rest/rest-extractor.service.ts b/client/src/app/shared/rest/rest-extractor.service.ts
index b1e22a76c..8ed24c727 100644
--- a/client/src/app/shared/rest/rest-extractor.service.ts
+++ b/client/src/app/shared/rest/rest-extractor.service.ts
@@ -33,13 +33,15 @@ export class RestExtractor {
33 return target 33 return target
34 } 34 }
35 35
36 handleError (err: HttpErrorResponse) { 36 handleError (err: any) {
37 let errorMessage 37 let errorMessage
38 38
39 if (err.error instanceof Error) { 39 if (err.error instanceof Error) {
40 // A client-side or network error occurred. Handle it accordingly. 40 // A client-side or network error occurred. Handle it accordingly.
41 errorMessage = err.error.message 41 errorMessage = err.error.message
42 console.error('An error occurred:', errorMessage) 42 console.error('An error occurred:', errorMessage)
43 } else if (typeof err.error === 'string') {
44 errorMessage = err.error
43 } else if (err.status !== undefined) { 45 } else if (err.status !== undefined) {
44 // A server-side error occurred. 46 // A server-side error occurred.
45 if (err.error && err.error.errors) { 47 if (err.error && err.error.errors) {