Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error handling on download error #289

Merged
merged 1 commit into from
Apr 11, 2015
Merged

Fix error handling on download error #289

merged 1 commit into from
Apr 11, 2015

Conversation

eru
Copy link
Contributor

@eru eru commented Feb 22, 2015

src/lib/content.js の downloadFile メソッドを使う、"Photo - Upload from Cache" などで、画面上に表示されていても、実際にはファイルがない場合などに、src/lib/utils.js の request メソッドからのエラーが、投げっぱなしジャーマンになってしまっていて、呼び出し元でエラーハンドリングできなかったのを修正。

@@ -808,6 +808,8 @@
var mime = res.getResponseHeader('Content-Type').replace(/;.*/, '');
ext = getFileExtensionFromMime(mime) || ext;
return createFileEntryFromBlob(res.response, ext);
}).catch(function (res) {
throw new Error(res);
Copy link
Member

Choose a reason for hiding this comment

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

I think this change is not necessary. Without rethrowing an error, promise status becomes an errored.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your review. I fix it.

@Constellation
Copy link
Member

Thank you for your patch. Reviewed :)

Constellation added a commit that referenced this pull request Apr 11, 2015
Fix error handling on download error
@Constellation Constellation merged commit 085af23 into taberareloo:master Apr 11, 2015
@Constellation
Copy link
Member

OK, merged :)

@eru eru deleted the fixDownload branch April 11, 2015 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants