mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-20 20:46:53 +00:00
Improve frontend error handling
This commit is contained in:
1 parent
a83c7c64b5
commit
dd575ccb88
7 files changed
+274
-275
No files matched your search
@@ -13,6 +13,8 @@ export interface Toast {
|
||||
actionName?: string
|
||||
|
||||
classname?: string
|
||||
|
||||
error?: any
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
@@ -30,12 +32,13 @@ export class ToastService {
|
||||
this.toastsSubject.next(this.toasts)
|
||||
}
|
||||
|
||||
showError(content: string, delay: number = 10000) {
|
||||
showError(content: string, delay: number = 10000, error: any = null) {
|
||||
this.show({
|
||||
title: $localize`Error`,
|
||||
content: content,
|
||||
delay: delay,
|
||||
classname: 'error',
|
||||
error,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user