Closed The-Huginn closed 6 months ago
We are talking about an exception/error case, so performance is less of a concern. We could also limit the performance implications by checking .startsWith("<!DOCTYPE html>\n<--")
and some other inexpensive checks.
I'd suggest adding a new ServiceDownExceptuon
that inherits from http exception. That way existing code will still be able to handle it as a standard http error.
Maybe we could test the content type is text/html
and we have a line starting with <title>Unicorn!
. The Unicorn has been the sign of a non-working GitHub for ages.
Sounds good, I will try to come back with a solution early next week hopefully.
Note, You will need to create custom test input files to verify the functionality.
Describe the bug Recently, on 1st of March, '24, there was an outage of GitHub's API. However, it is propagated as a simple HttpException.
Expected behavior It would be nice, to have a custom Exception for such edge case.
Additional context I see, this is an edge case, that might not be caught often. However, it would be nice to have. The root cause for my problem came from GitHubConnectorResponserErrorHandler. I unfortunately do not have the status code. But I have the body of the returned response, please below
I am not sure, if you would agree with
contains()
to search for some keywords from the response due to performance concerns. I would be glad to take a look at this issue, if you would like me to.Full stacktrace with the returned message: