Skip to content

Commit

Permalink
feat: improve error messages of upload (#2129)
Browse files Browse the repository at this point in the history
* improve error messages of upload

* Revert "improve error messages of upload"

This reverts commit 8ed9f24.

* fix: update general error messages for upload
  • Loading branch information
hdamr authored Jun 23, 2021
1 parent 635c9fe commit 95484c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/vaadin-upload/src/vaadin-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,9 @@ class UploadElement extends ElementMixin(ThemableMixin(PolymerElement)) {
unknown: 'unknown remaining time'
},
error: {
serverUnavailable: 'Server Unavailable',
unexpectedServerError: 'Unexpected Server Error',
forbidden: 'Forbidden'
serverUnavailable: 'Upload failed, please try again later',
unexpectedServerError: 'Upload failed due to server error',
forbidden: 'Upload forbidden'
}
},
units: {
Expand Down
2 changes: 1 addition & 1 deletion packages/vaadin-upload/test/upload.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('upload', () => {
const errorEvt = errorSpy.firstCall.args[0];

expect(errorEvt.detail.file.uploading).not.to.be.ok;
expect(errorEvt.detail.file.error).to.be.equal('Server Unavailable');
expect(errorEvt.detail.file.error).to.be.equal('Upload failed, please try again later');
expect(errorEvt.detail.xhr.status).not.to.be.equal(200);
});

Expand Down

0 comments on commit 95484c1

Please # to comment.