Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Add catch block for failed file promise in FileRepository #90

Merged
merged 4 commits into from
Jan 22, 2019

Conversation

f1ames
Copy link
Contributor

@f1ames f1ames commented Jan 16, 2019

Suggested merge commit message (convention)

Other: Add catch block for failed file promise in FileRepository.


Additional information

Related to ckeditor/ckeditor5-image#264. In cases where File constructor is not supported or file promise fails for any other reason, loader.file.then may throw an error if there is no catch there (or anywhere in the code).

image

In short, if there is no loader.file.catch in the code (some upload adapters may have it, some not), the code before modification threw an error on rejected promise.

@f1ames
Copy link
Contributor Author

f1ames commented Jan 16, 2019

See also ckeditor/ckeditor5-image#264 (comment).

@f1ames f1ames requested a review from jodator January 16, 2019 14:27
@coveralls
Copy link

coveralls commented Jan 16, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 83b78bd on t/ckeditor5-image/263 into b3e7d9c on master.

@jodator
Copy link
Contributor

jodator commented Jan 21, 2019

@f1ames: Sorry for longer review - at least one test is needed for a change :) Other then that I can see we can close this and ckeditor/ckeditor5-image#264 with this one :)

Copy link
Contributor

@jodator jodator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@jodator jodator merged commit a2de5d5 into master Jan 22, 2019
@jodator jodator deleted the t/ckeditor5-image/263 branch January 22, 2019 14:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants