extra test for return value of errors

This commit is contained in:
Jacob Overgaard
2023-08-08 15:30:42 +02:00
parent f91dc604bc
commit 42c12e0f9c

View File

@@ -96,8 +96,8 @@ export class UmbResourceController extends UmbBaseController {
if (this.#notificationContext) {
this.#notificationContext.peek('danger', {
data: {
headline: error.body.title ?? error.name ?? 'Server Error',
message: error.body.detail ?? error.message ?? 'Something went wrong',
headline: error.body?.title ?? error.name ?? 'Server Error',
message: error.body?.detail ?? error.message ?? 'Something went wrong',
},
...options,
});