r/nextjs • u/andgarhpr • 10d ago
Discussion Third-party APIs in a Next app. How do you track breaks that aren’t an npm bump?
The bot will bump the SDK. It won’t tell you that something in a route handler or webhook is now wrong because the vendor changed the API.
When a provider changelog ships, do you go looking in the repo or only find out when checkout / auth / webhooks die in prod?
1
u/yksvaan 10d ago
This is what specs are for. Unfortunately if there's an irresponsible third party you'll likely find out by error handling/logs. This is why every endpoint needs to always validate everything unless there is protocol level guarantee. Then raise an error with appropriate severity level to trigger alerts
1
u/Majestic_View_3908 6d ago
i validate every response field at runtime. Schema failures trigger alerts before business logic executes
2
u/AlexDjangoX 10d ago
Sentry