-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Improve error messages when URI points to a file that doesn't exist #12490
Improve error messages when URI points to a file that doesn't exist #12490
Conversation
the title is not clear. does this PR fix a NPE? if the URI is wrong, what kind of exception is thrown before and what exception will be thrown after this change? |
Thank you @tejaswini-imply. These errors are much better. Travis is likely failing because of a lack of code coverage around your change. can you also add a unit test for your change? Your changes LGTM otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
+1 after CI passes.
@@ -95,4 +97,33 @@ public void test() throws IOException | |||
Assert.assertEquals(numFiles, i); | |||
} | |||
} | |||
|
|||
@Test | |||
public void testIncorrectURI() throws IOException, URISyntaxException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this test issue an http request to HTTP://test/path
? can we use a mock entity that throws an exception instead?
Thank you @tejaswini-imply |
Description
GCS
Before
After
S3
Before
After
Fixes the error message thrown with input
uri
whenIOException
while convertingInputEntity
toCloseableIterator<InputRow>
Key changed/added classes in this PR
InputEntityIteratingReader
This PR has: