Method
list
(key: IntegrationTaskKey)
Source from the content-addressed store, hash-verified
| 109 | } |
| 110 | |
| 111 | list(key: IntegrationTaskKey): Promise<ListAudiencesResult> { |
| 112 | return this.runTask( |
| 113 | key, |
| 114 | async (client, task) => { |
| 115 | const { error, data } = await client.audiences.list(); |
| 116 | |
| 117 | if (error) { |
| 118 | throw error; |
| 119 | } |
| 120 | |
| 121 | if (!data) { |
| 122 | throw new Error("No data returned from Resend"); |
| 123 | } |
| 124 | |
| 125 | return data; |
| 126 | }, |
| 127 | { |
| 128 | name: "List Audiences", |
| 129 | retry: retry.standardBackoff, |
| 130 | }, |
| 131 | handleResendError |
| 132 | ); |
| 133 | } |
| 134 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected