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

Gracefully handle certain exceptions #2062

Closed
somesh-kumar opened this issue Nov 7, 2019 · 4 comments
Closed

Gracefully handle certain exceptions #2062

somesh-kumar opened this issue Nov 7, 2019 · 4 comments

Comments

@somesh-kumar
Copy link
Contributor

somesh-kumar commented Nov 7, 2019

There are quite a few exceptions in production logs due to:

  • Session invalid
  • User does not have permissions to access a model
  • Invalid characters used in search

Actual: ERROR is thrown

Expected: Handle these exceptions gracefully with an INFO message. Identify if there are more such exceptions which do not need to be thrown as an ERROR.

@aedelmann aedelmann added this to the 1.0-M1 milestone Nov 7, 2019
@aedelmann aedelmann added this to To Do in 0.13 (E01.19) Nov 8, 2019
@aedelmann aedelmann moved this from To Do to In Progress in 0.13 (E01.19) Nov 20, 2019
@aedelmann aedelmann self-assigned this Nov 20, 2019
@aedelmann aedelmann added this to To do in 0.12.5 Nov 28, 2019
@aedelmann aedelmann removed this from In Progress in 0.13 (E01.19) Nov 28, 2019
@aedelmann aedelmann modified the milestones: 1.0-M1, 0.12.5 Nov 28, 2019
@aedelmann aedelmann removed their assignment Nov 29, 2019
@ghost
Copy link

ghost commented Dec 4, 2019

Having a look.

@ghost
Copy link

ghost commented Dec 4, 2019

Hi @somesh-kumar @aedelmann , I've started having a look and so far, I can categorize a couple of those cases, based on the error messages I got from AWS.
However, I'm having a hard time replicating anything consistently - maybe either of you can help me do that locally in an ad-hoc "discovery" session.

  • Session invalid --> suspect AbstractRepositoryController#unAuthorized --> change logging level would do.

  • User does not have permissions to access a model --> maybe this matches one or more of the exception handlers in AbstractRepositoryOperation#doInSession? In which case, either lower the logging level to warn or see caller if rethrown?

  • Invalid characters in search --> we had an initial conversation with Somesh but I forgot where we left it. It seems that spamming a few search requests containing the % character in the prod server consistently fails, but no e-mail seems to be sent after the threshold. The same fails locally, but is intercepted at Spring level. URL-encoding the text at front-end controller level doesn't seem to do anything. @somesh-kumar can we discuss replication again, and the last actions you've taken after our internal discussion? Your last statement was: "still waiting for an exception email to come to me, hoping we get the same error"

@ghost
Copy link

ghost commented Dec 6, 2019

PR here.
As mentioned, my change set is weaksauce for now: it only lowers some logging levels to warning.
Per se, this should not be dangerous given the use cases, but it might contribute to clear some of the AWS threshold occurrences.
My take is we can iterate further once this is merged, and see if there is something missed out.

@aedelmann aedelmann moved this from To do to In progress in 0.12.5 Dec 9, 2019
@aedelmann
Copy link
Contributor

Hi @mena-bosch
With your fix, lets keep an eye on the logs and see if your changes improved it. Nevertheless, I would recommend to specify an Exception Handling concept, with all possible errors that could occur in the system and define the measures that need to be taken. Lets create a separate issue for that. I would close this issue.

@aedelmann aedelmann moved this from In progress to Done in 0.12.5 Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
0.12.5
  
Done
Development

No branches or pull requests

2 participants