better error message printing (no more [Object object]) when server error is sent.

This commit is contained in:
Jason Kulatunga 2023-07-16 21:35:28 -07:00
parent 879312a852
commit be30cb046f
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ export class MedicalSourcesConnectedComponent implements OnInit {
const toastNotification = new ToastNotification()
toastNotification.type = ToastType.Error
toastNotification.message = `An error occurred while accessing ${sourceType}: ${err}`
toastNotification.message = `An error occurred while accessing ${sourceType}: '${JSON.stringify(err)}'`
toastNotification.autohide = false
this.toastService.show(toastNotification)
console.error(err)
@ -206,7 +206,7 @@ export class MedicalSourcesConnectedComponent implements OnInit {
const toastNotification = new ToastNotification()
toastNotification.type = ToastType.Error
toastNotification.message = `An error occurred while accessing ${sourceType}: ${err}`
toastNotification.message = `An error occurred while accessing ${sourceType}: '${JSON.stringify(err)}'`
toastNotification.autohide = false
this.toastService.show(toastNotification)
console.error(err)