improve the headline

This commit is contained in:
Jacob Overgaard
2024-03-06 12:18:20 +01:00
parent 399b2fda25
commit 3e2291dc83

View File

@@ -97,17 +97,19 @@ export class UmbResourceController extends UmbControllerBase {
// Server Error
if (this.#notificationContext) {
let headline = error.body?.title ?? error.name ?? 'Server Error';
let message = 'A fatal server error occurred. If this continues, please reach out to your administrator.';
// Special handling for ObjectCacheAppCache corruption errors, which we are investigating
if (error.body?.detail?.includes('ObjectCacheAppCache')) {
headline = 'Please restart the server';
message =
'The Umbraco object cache is corrupt, but your action may still have been executed. Please restart the server to reset the cache. This is a work in progress.';
}
this.#notificationContext.peek('danger', {
data: {
headline: error.body?.title ?? error.name ?? 'Server Error',
headline,
message,
},
...options,