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

Import modal: better error for Invalid file format. #4159

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Aug 30, 2023

we're checking the mime-type before allowing collection upload, this mostly works, but in some cases (see AAP-15541), it can fail unexpectedly.

This should make debugging that case easier, by including the detected type in the error message:

20230830180831
20230830181141

we're checking the mime-type before allowing collection upload,
this mostly works, but in some cases (see AAP-15541), it can fail unexpectedly.

This should make debugging that case easier, by including the detected type in the error message.

No-Issue
@github-actions github-actions bot added the backport-4.7 This PR should be backported to stable-4.7 (2.4) label Aug 30, 2023
@himdel
Copy link
Collaborator Author

himdel commented Aug 31, 2023

might be a good idea to make the message ignorable, as per https://developer.mozilla.org/en-US/docs/Web/API/File/type, we might not want to rely on the type detection too much...

=>
(skippable error)
20230831170456
(skipped error)
20230831170504
(default error, this one from API)
20230831170516

@himdel himdel merged commit 9d4df78 into ansible:master Aug 31, 2023
@himdel himdel deleted the import-modal-type branch August 31, 2023 19:46
@patchback

This comment was marked as outdated.

himdel added a commit to himdel/ansible-hub-ui that referenced this pull request Aug 31, 2023
* Import modal: better error for Invalid file format.

we're checking the mime-type before allowing collection upload,
this mostly works, but in some cases (see AAP-15541), it can fail unexpectedly.

This should make debugging that case easier, by including the detected type in the error message.

No-Issue

* make filetype detection error skippable

(cherry picked from commit 9d4df78)
himdel added a commit that referenced this pull request Aug 31, 2023
* Import modal: better error for Invalid file format.

we're checking the mime-type before allowing collection upload,
this mostly works, but in some cases (see AAP-15541), it can fail unexpectedly.

This should make debugging that case easier, by including the detected type in the error message.

No-Issue

* make filetype detection error skippable

(cherry picked from commit 9d4df78)
@github-actions github-actions bot added the backported-4.7 This PR has been backported to stable-4.7 (2.4) label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-4.7 This PR should be backported to stable-4.7 (2.4) backported-4.7 This PR has been backported to stable-4.7 (2.4)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant