return 400 instead of 503 for bad verification session-id

This commit is contained in:
Ravi Khadiwala
2023-04-20 19:11:33 -05:00
committed by ravi-signal
parent 59ebe65643
commit 0e0c0c5dfe
2 changed files with 18 additions and 2 deletions

View File

@@ -623,7 +623,7 @@ public class VerificationController {
} catch (final CompletionException | CancellationException e) {
final Throwable unwrapped = ExceptionUtils.unwrap(e);
if (unwrapped.getCause() instanceof StatusRuntimeException grpcRuntimeException) {
if (unwrapped instanceof StatusRuntimeException grpcRuntimeException) {
if (grpcRuntimeException.getStatus().getCode() == Status.Code.INVALID_ARGUMENT) {
throw new BadRequestException();
}