fix: add user feedback message for unsupported file type - #142
Open
georgeRobertson wants to merge 1 commit into
Open
fix: add user feedback message for unsupported file type#142georgeRobertson wants to merge 1 commit into
georgeRobertson wants to merge 1 commit into
Conversation
georgeRobertson
marked this pull request as ready for review
August 19, 2026 17:20
|
stevenhsd
reviewed
Aug 20, 2026
| except KeyError as exc: | ||
| if file_extension: | ||
| err_msg = ( | ||
| f"The supplied file extension `{file_extension if file_extension else None}`" |
Contributor
There was a problem hiding this comment.
already doing if check in line 64
stevenhsd
reviewed
Aug 20, 2026
| **reader_config.kwargs_, **backend_reader_kwargs if backend_reader_kwargs else {} | ||
| ) | ||
| return reader | ||
| except KeyError as exc: |
Contributor
There was a problem hiding this comment.
There are two possible key errors here - one to do with file extension and one to do with reader stated - how can you differentiate between the two?
stevenhsd
reviewed
Aug 20, 2026
| f"{out}{model_name}", | ||
| ) | ||
| except MessageBearingError as exc: | ||
| errors.extend(exc.messages) |
Contributor
There was a problem hiding this comment.
Can you add in logging here - exception to capture stack trace?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



TLDR of changes
Raise a user feedback message rather than error when a user submits a file with an unsupported file type.
What kind of changes does this PR introduce?
Tick all that apply
Please check if the PR fulfills these requirements