Invert `String.equals()` to prevent `NullPointerException`
This commit is contained in:
parent
b89e2e5355
commit
656326355a
|
@ -546,7 +546,7 @@ public class SubscriptionController {
|
||||||
lastSubscriptionCreatedAt)
|
lastSubscriptionCreatedAt)
|
||||||
.exceptionally(e -> {
|
.exceptionally(e -> {
|
||||||
if (e.getCause() instanceof StripeException stripeException
|
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)
|
throw new BadRequestException(Response.status(Status.BAD_REQUEST)
|
||||||
.entity(new SetSubscriptionLevelErrorResponse(List.of(
|
.entity(new SetSubscriptionLevelErrorResponse(List.of(
|
||||||
new SetSubscriptionLevelErrorResponse.Error(
|
new SetSubscriptionLevelErrorResponse.Error(
|
||||||
|
|
Loading…
Reference in New Issue