mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 08:56:47 +00:00
Minor: Return exception instead of throwing it in .orElseThrow()
Gets rid of an IntelliJ warning about it. No difference in behavior, there is a test that already covers this path.
This commit is contained in:
1 parent
ed72d7f9ec
commit
d39abc3008
1 file changed
+1
-1
@@ -87,7 +87,7 @@ public class CaptchaChecker {
|
||||
final Action parsedAction = Action.parse(action)
|
||||
.orElseThrow(() -> {
|
||||
Metrics.counter(INVALID_ACTION_COUNTER_NAME, "action", action).increment();
|
||||
throw new BadRequestException("invalid captcha action");
|
||||
return new BadRequestException("invalid captcha action");
|
||||
});
|
||||
|
||||
if (!parsedAction.equals(expectedAction)) {
|
||||
|
||||
Reference in new issue
Block a user