Skip to content

Commit

Permalink
Fix propagation of HTTPStatusException
Browse files Browse the repository at this point in the history
We need to handle vibe.d exceptions properly,
if an HTTPStatusException is thrown we need to
propagate it to the calling code so it can
be properly handled.
  • Loading branch information
AndrejMitrovic committed Aug 10, 2020
1 parent 5e25f0e commit 2c1791e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/agora/network/NetworkClient.d
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@ class NetworkClient
}
catch (Exception ex)
{
import vibe.http.common : HTTPStatusException;
if (auto http = cast(HTTPStatusException)ex)
throw http; // e.g. getPublicKey() might not be implemented

try
{
log.format(log_level, "Request '{}' to {} failed: {}",
Expand Down

0 comments on commit 2c1791e

Please sign in to comment.