-
Notifications
You must be signed in to change notification settings - Fork 904
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
Remote Backend: Throw DBException in functions that allow it #8943
Conversation
Out if curiosity, did you consider making |
I was afraid with blowing up the auth process on a failure.. but it looks like the database backend do the same as well. I will change this PR to indeed throw on send and recv failures. |
c504e15
to
ac217a9
Compare
hhrm, by the looks of the CI, |
That's a valid result for some operations, I believe? |
it is |
959baf1
to
ba35393
Compare
ba35393
to
9f87db2
Compare
3a6a5b3
to
e3dbf3c
Compare
These might indicate that the function is not implemented
e3dbf3c
to
f2d90ef
Compare
// bad. | ||
g_log<<Logger::Warning<<"Received unacceptable HTTP status code "<<std::to_string(resp.status)<<" from HTTP endpoint"<<endl; |
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.
should this be DBException instead?
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.
hmm, I typed that in, but I think blowing up the connection on a 404 is a bit much.....
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.
uhm, the if condition precludes 404, so it's not blowing up the connection.. I am bit puzzled how 404's are treated now.
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.
should there be unit/integration test for that?
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.
uhm, the if condition precludes 404, so it's not blowing up the connection.. I am bit puzzled how 404's are treated now.
ah yes :)
should there be unit/integration test for that?
It is implicitly tested, as I got exceptions on 404s before :)
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 looks resolved to me, except for the exception type, right?
Title says DBException, code says PDNSException, I trust the title is outdated? |
We use PDNSExceptions to signal problems, when they aren't recoverable by the backend, we throw a DBException toward the Ueberbackend. |
Oh, I see now that the code does both. Ok! |
Short description
These functions are called inside a try block in e.g. the
slavecommunicator and them
throw
ing actually makes the reportingbetter.
Checklist
I have: