0
0
mirror of https://github.com/monero-project/kovri synced 2025-10-06 08:42:45 +02:00

HTTPResponse: assert and throw upon invalid status

Referencing #938.
This commit is contained in:
anonimal
2018-07-03 01:02:33 +00:00
parent 4d07cac05d
commit 49eb7653e0

View File

@@ -109,7 +109,8 @@ std::string HTTPResponse::get_message(const status_t status) const
case status_t::space_unavailable:
return "Insufficient Space to Store Resource";
default:
return "Unknown";
assert(false);
throw std::invalid_argument("invalid HTTP status code");
}
}