π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
docs(claude): code invoked by external webhooks must not throw
Gilad Resisi256f2b468f53
diff --git a/CLAUDE.md b/CLAUDE.mdindex ac91bf6dc..9c89fb7f7 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -76,4 +76,5 @@ const useCommunity = () => {- Before adding a field to a shared repository/service `select` or changing a shared method's return shape, grep for all its consumers (frontend, public API, MCP/agent tools, orchestrator, webhooks) and confirm the change is intended for each.- Exposing a stored field to a new external surface (public API, MCP, webhooks) is a data-exposure decision β ask first, and check what existing production rows hold for that column before shipping it.- Never silently change the meaning or format of a value persisted in an existing DB column; that affects every reader and all historical rows, so ask first.-- Never return a raw Prisma row from a model that holds credentials (`Integration`, `User` and similar) in a controller response. Repository writes on those models must use a `select` with only the fields the caller needs (like `setTimes` with `select: { id: true }`), or the controller returns nothing. This applies even where nearby code looks different.\ No newline at end of file+- Never return a raw Prisma row from a model that holds credentials (`Integration`, `User` and similar) in a controller response. Repository writes on those models must use a `select` with only the fields the caller needs (like `setTimes` with `select: { id: true }`), or the controller returns nothing. This applies even where nearby code looks different.+- Be extra careful with code invoked by webhooks of external systems (Stripe, RevenueCat and other payment providers), including everything they call down the stack (e.g. `SubscriptionService.createOrUpdateSubscription`, `modifySubscription`, `deleteSubscription`). That code must not throw exceptions: never add a `throw`, and wrap any call that can fail (DB, provider API) so a failure is caught and logged instead of propagating. A webhook that throws leaves billing state half-applied for a paying customer.