Invert `String.equals()` to prevent `NullPointerException`

This commit is contained in:
Chris Eager 2023-09-06 21:48:55 -05:00 committed by ravi-signal
parent b89e2e5355
commit 656326355a
1 changed files with 1 additions and 1 deletions

View File

@ -546,7 +546,7 @@ public class SubscriptionController {
lastSubscriptionCreatedAt)
.exceptionally(e -> {
if (e.getCause() instanceof StripeException stripeException
&& stripeException.getCode().equals("subscription_payment_intent_requires_action")) {
&& "subscription_payment_intent_requires_action".equals(stripeException.getCode())) {
throw new BadRequestException(Response.status(Status.BAD_REQUEST)
.entity(new SetSubscriptionLevelErrorResponse(List.of(
new SetSubscriptionLevelErrorResponse.Error(