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
feat(error-handling): return status 504 instead of 500 for triplestore timeout exception (DEV-749) #2046
feat(error-handling): return status 504 instead of 500 for triplestore timeout exception (DEV-749) #2046
Conversation
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.
This is not a code review.
I tested it with the tweaked config that @BalduinLandolt mentioned in DEV-751 and I was able to produce a 504 timeout-error with a simple fulltext-search. So, it seems to work. Thanks
Hm, but a gravsearch query returns a 500 server error.
Kudos, SonarCloud Quality Gate passed!
|
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
} else { | ||
log.error( | ||
e, | ||
s"Couldn't parse response from triplestore:$logDelimiter$turtleStr${logDelimiter}in response to SPARQL query:$logDelimiter$sparql" |
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.
Why does logDelimiter
once is wrapped into ${...}
and once not? Can it be unified? I think both $...
and ${...}
are the same.
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.
you're right, that's just how it is in the place where I copy-pasted it from... ;) I'll unify it
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.
ah, no... this can't be changed because right after the variable there is a word, so it would consider this part of the variable name, which then could not be found... I'll have to leave it as it is, even though it looks strange
Resolves DEV-749
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When a triplestore request times out, a generic
500 Internal Server Error
is returned.The app can therefor not apply any specific behaviour for this case.
Issue Number: DEV-749
What is the new behavior?
A specific
504 Gateway Timeout
is returned to enable the App to handle this case specifically.Does this PR introduce a breaking change?
Other information