Skip to content

Commit

Permalink
catch remote runtime excep
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Oct 28, 2023
1 parent 72a169d commit e23e134
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,16 @@ public void register(Credentials request, Digest from, StreamObserver<Validation
responseObserver.onError(new StatusRuntimeException(Status.UNAUTHENTICATED.withDescription("Invalid credentials")));
return;
}
Validations invite = Gorgoneion.this.register(request);
if (invite == null) {
responseObserver.onError(new StatusRuntimeException(Status.UNAUTHENTICATED.withDescription("Invalid credentials")));
} else {
responseObserver.onNext(invite);
responseObserver.onCompleted();
try {
Validations invite =Gorgoneion.this.register(request);
if (invite == null) {
responseObserver.onError(new StatusRuntimeException(Status.UNAUTHENTICATED.withDescription("Invalid credentials")));
} else {
responseObserver.onNext(invite);
responseObserver.onCompleted();
}
} catch (StatusRuntimeException e) {
responseObserver.onError(e);
}
}

Expand Down
4 changes: 4 additions & 0 deletions thoth/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
<appender-ref ref="STDOUT" />
</logger>

<logger name="com.salesforce.apollo.thoth.KerlSpace" level="info" additivity="false">
<appender-ref ref="STDOUT" />
</logger>

<logger name="com.salesforce.apollo.thoth.grpc" level="info" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
Expand Down

0 comments on commit e23e134

Please sign in to comment.