mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 15:55:31 +01:00
proper messages when uploading fails
This commit is contained in:
parent
cc74be9ccc
commit
5a4cb5fe4a
2 changed files with 9 additions and 4 deletions
|
|
@ -99,14 +99,13 @@ export class UploadFileWidgetComponent implements OnInit {
|
|||
}
|
||||
|
||||
}, error => {
|
||||
status.updateProgress(FileStatusPhase.FAILED)
|
||||
switch (error.status) {
|
||||
case 400: {
|
||||
status.message = error.error.document
|
||||
this.consumerStatusService.fail(status, error.error.document)
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
status.message = `${error.status} ${error.statusText}`
|
||||
this.consumerStatusService.fail(status, `${error.status} ${error.statusText}`)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue