Add exception handler to pubsub

This commit is contained in:
Kavin 2023-06-30 14:46:01 +01:00
parent 990388f0d4
commit d707beb85a
No known key found for this signature in database
GPG Key ID: 6E4598CA5C92C41F
1 changed files with 4 additions and 0 deletions

View File

@ -48,6 +48,10 @@ public class PubSubHelper {
.thenAccept(resp -> {
if (resp.status() != 202)
System.out.println("Failed to subscribe: " + resp.status() + "\n" + new String(resp.body()));
})
.exceptionally(e -> {
ExceptionHandler.handle((Exception) e);
return null;
});
}
}