Skip to content

Added handlers for unexpected errors (#1235)#1237

Merged
pavgra merged 4 commits into
rc-2.7.3from
issue-1235-fix_unexpected_error
Jul 26, 2019
Merged

Added handlers for unexpected errors (#1235)#1237
pavgra merged 4 commits into
rc-2.7.3from
issue-1235-fix_unexpected_error

Conversation

@ssuvorov-fls

Copy link
Copy Markdown
Contributor

fixes #1235

} else {
responseStatus = Status.INTERNAL_SERVER_ERROR;
// Create new message to prevent sending error information to client
ex = new RuntimeException("Oooops!.. Something went wrong :(");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This isn't exactly helpful when a user reports a problem. Can't we include some kind of informationa bout the nature of the error? Null Pointer Exception? Duplicate Key Exception? Something better than 'Oops! We died!'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree with @chrisknoll

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So, what I'd suggest is to add separate handlers for NPE and SQL exception (and we already have a handler for Duplicate Key - see if(ex instanceof DataIntegrityViolationException)) and leave others under a generic type of error with the "oops...". And as move forward, we could extend the list of specific error handlers on a need basis. @chrisknoll , what do you think of this?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm trying to avoid messages that give no usuable information as to the nature of the problem (ie: the else of 'oops' is not acceptable'). what' I'm looking for here is the 'else' statement to provide some level of information about the nature of the exception. Is there any danger with instead of "Oppos!" we could get something like: 'An exception ocurred: ' + ex.getClass().getName()'

@pavgra

pavgra commented Jul 26, 2019

Copy link
Copy Markdown
Contributor

@chrisknoll , are you OK with the current approach?

@chrisknoll

Copy link
Copy Markdown
Collaborator

Yes, Looks good. Thank you.

@pavgra pavgra merged commit 740b61a into rc-2.7.3 Jul 26, 2019
@pavgra pavgra deleted the issue-1235-fix_unexpected_error branch July 26, 2019 15:28
anthonysena pushed a commit that referenced this pull request Aug 8, 2019
* Remove produces annotation + minor improvements (#1232)
* Fix overlap logic.
Allow event cohort periods that start within the target cohort era.  Prior version required the event cohort era to start and end in the target cohort era.
When collapsing, ensure start-end dates span at least a day.
Use count_big when counting cohort events and pathways.
Pad end dates to make non-inclusive.
Added casts for impala
Added temp-table cleanup.
Fixes #779.

* Omit cohort expression from list. - Fixes #219.
* Added client cache directives to response header (#1231)
* Removed legacy service which exposed server side request forgery issue (#1241)
* Added handlers for unexpected errors (#1237)
* Restored Kerberos auth support (#1253)
* Fixes masquerading of credentials in PLE / PLP results (#1255)
* Better quotes handling
* exclude older sql render versions (#1259)
* Fix compatability of /cohortdefinition/{id} endpoint (#1262)
* fixes cycling dependencies (#1264)
* Fix grouping problem in bq (#1267) (#1269)
* Fixes failed Cohort Pathways on Impala (#1274)
* fixes counts as bigint
* fixes Pathways for BQ
* Fixes save of Cohort Definitions when criteria requiring narrower CDM range are added (#1278)
* Fixes timeout based invalidation of Execution Engine jobs (#1272)
* Fixes Impala drivers (#1280)
* Updates circe to newer release which resolves PLE issues on Impala
* Merge fixes
@anthonysena anthonysena modified the milestones: V2.8.0 - Backlog, 2.7.3 Dec 2, 2019
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.

5 participants