added handler on internal server error
This commit is contained in:
@@ -124,6 +124,8 @@ Check parseOfdRuAnswer(std::string html) {
|
||||
if ((products.size() + amounts.size() + prices.size()) == 0) {
|
||||
if (html == "Bad Request4") { // Failed to solve a captcha
|
||||
throw OfdRequestException("Incorrect captcha");
|
||||
} else if (html.find("500 - Internal server error.") != std::string::npos) {
|
||||
throw OfdRequestException("Internal server error");
|
||||
} else { // Most likely that the check does not exist
|
||||
throw OfdRequestException("Does not exist");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user