From 426e4d4d2c18002b95a4ed1bcd2acbfa41b56e23 Mon Sep 17 00:00:00 2001 From: Lee Danilek Date: Mon, 21 Oct 2024 15:48:15 -0400 Subject: [PATCH] add note on retries to readme --- README.md | 5 +++++ src/component/_generated/api.d.ts | 11 +++++++++++ src/component/_generated/api.js | 3 ++- src/component/_generated/server.d.ts | 2 -- src/component/_generated/server.js | 2 -- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a35e897..d5ae39b 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,11 @@ export const handleIncomingMessage = internalMutation({ }); ``` +If the `handleIncomingMessage` callback throws an error, the message will not be +saved and the webhook will throw an error. Twilio +[does not retry webhook requests](https://www.twilio.com/docs/usage/security/availability-reliability), +but you can replay them manually from the Twilio "Error logs" console. + ## Querying Messages To list all the mssages, use the `list` method in your Convex function. diff --git a/src/component/_generated/api.d.ts b/src/component/_generated/api.d.ts index 2ba9c8c..bc8cbf7 100644 --- a/src/component/_generated/api.d.ts +++ b/src/component/_generated/api.d.ts @@ -63,6 +63,7 @@ export type Mounts = { num_segments: string; price: string | null; price_unit: string | null; + rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; @@ -91,6 +92,7 @@ export type Mounts = { num_segments: string; price: string | null; price_unit: string | null; + rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; @@ -119,6 +121,7 @@ export type Mounts = { num_segments: string; price: string | null; price_unit: string | null; + rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; @@ -147,6 +150,7 @@ export type Mounts = { num_segments: string; price: string | null; price_unit: string | null; + rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; @@ -180,6 +184,7 @@ export type Mounts = { num_segments: string; price: string | null; price_unit: string | null; + rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; @@ -208,6 +213,7 @@ export type Mounts = { num_segments: string; price: string | null; price_unit: string | null; + rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; @@ -236,6 +242,7 @@ export type Mounts = { num_segments: string; price: string | null; price_unit: string | null; + rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; @@ -264,6 +271,7 @@ export type Mounts = { num_segments: string; price: string | null; price_unit: string | null; + rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; @@ -292,6 +300,7 @@ export type Mounts = { num_segments: string; price: string | null; price_unit: string | null; + rest?: any; sid: string; status: string; subresource_uris: { feedback?: string; media: string } | null; @@ -335,4 +344,6 @@ export declare const internal: FilterApi< FunctionReference >; +export declare const components: {}; + /* prettier-ignore-end */ diff --git a/src/component/_generated/api.js b/src/component/_generated/api.js index b5f2e08..853a45b 100644 --- a/src/component/_generated/api.js +++ b/src/component/_generated/api.js @@ -10,7 +10,7 @@ * @module */ -import { anyApi } from "convex/server"; +import { anyApi, componentsGeneric } from "convex/server"; /** * A utility for referencing Convex functions in your app's API. @@ -22,5 +22,6 @@ import { anyApi } from "convex/server"; */ export const api = anyApi; export const internal = anyApi; +export const components = componentsGeneric(); /* prettier-ignore-end */ diff --git a/src/component/_generated/server.d.ts b/src/component/_generated/server.d.ts index d74377e..788e90c 100644 --- a/src/component/_generated/server.d.ts +++ b/src/component/_generated/server.d.ts @@ -150,6 +150,4 @@ export type DatabaseReader = GenericDatabaseReader; */ export type DatabaseWriter = GenericDatabaseWriter; -export declare const components: {}; - /* prettier-ignore-end */ diff --git a/src/component/_generated/server.js b/src/component/_generated/server.js index f9909da..1129936 100644 --- a/src/component/_generated/server.js +++ b/src/component/_generated/server.js @@ -91,6 +91,4 @@ export const internalAction = internalActionGeneric; */ export const httpAction = httpActionGeneric; -export const components = componentsGeneric(); - /* prettier-ignore-end */