diff --git a/frontend/app/services/data_service_v2/data_service_v2.ts b/frontend/app/services/data_service_v2/data_service_v2.ts
index bce60a6a6..d815f1d46 100644
--- a/frontend/app/services/data_service_v2/data_service_v2.ts
+++ b/frontend/app/services/data_service_v2/data_service_v2.ts
@@ -48,12 +48,16 @@ export class DataServiceV2 implements DataServiceV2Interface {
errorMessage = 'Request failed : Unable to get the profile data';
} else {
const urlObj = new URL(error.url || '');
+ const errorString = typeof error.error === 'object' ?
+ String(error.error?.error?.message) :
+ String(error.error);
+
errorMessage = 'There was an error in the requested URL ' +
urlObj.pathname + urlObj.search + '.
' +
'message: ' + error.message + '
' +
'status: ' + String(error.status) + '
' +
'statusText: ' + error.statusText + '
' +
- 'error: ' + String(error.error);
+ 'error: ' + errorString;
}
if (notifyError) {