-
Notifications
You must be signed in to change notification settings - Fork 101
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
[PLUGIN-1861] Error management for excel plugin #1935
Conversation
return getProgramFailureException((MissingSheetException) t, errorContext, | ||
ErrorType.USER); | ||
} | ||
if (t instanceof ReadException) { | ||
return getProgramFailureException((ReadException) t, errorContext, | ||
ErrorType.USER); | ||
} | ||
if (t instanceof EmptyFileException) { | ||
return getProgramFailureException((EmptyFileException) t, errorContext, | ||
ErrorType.USER); | ||
} | ||
if (t instanceof IllegalArgumentException) { |
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.
can we add some subCategories
for these errors?
Like for IllegalArgumentException
, subCategory can be Configuration
.
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.
Added !
private static final String ERROR_MESSAGE_FORMAT = "Error occurred in the phase: '%s'. Error message: %s"; | ||
private static final String SUBCATEGORY_CONFIGURATION = "Configuration"; | ||
private static final String SUBCATEGORY_DATA_MISSING = "Data Missing"; | ||
private static final String SUBCATEGORY_FILE_READ_ERROR = "File Read Error"; |
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.
Error
sounds redundant since it is already an errorCategory.
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.
Updated.
|
||
private static final String ERROR_MESSAGE_FORMAT = "Error occurred in the phase: '%s'. Error message: %s"; | ||
private static final String SUBCATEGORY_CONFIGURATION = "Configuration"; | ||
private static final String SUBCATEGORY_DATA_MISSING = "Data Missing"; |
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.
Data Integrity
sounds more appropriate which can signify that required data is missing or incomplete
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.
Updated.
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, please squash commits before merge.
Also cherry-pick the PR in release/2.13
Description
Error Management for argument setter exceptions
https://cdap.atlassian.net/browse/PLUGIN-1861
Code change
Modified HTTPArgumentSetter.java
Modified ArgumentSetter.java
Modified pom.xml
Tests
Test Case - tested with Incorrect json value and format
1. Success
2. Invalid Argument JSON format
3. Missing Argument JSON value