Method
get
(key: IntegrationTaskKey, payload: string)
Source from the content-addressed store, hash-verified
| 93 | } |
| 94 | |
| 95 | get(key: IntegrationTaskKey, payload: string): Promise<GetEmailResult> { |
| 96 | return this.runTask( |
| 97 | key, |
| 98 | async (client, task) => { |
| 99 | const { error, data } = await client.emails.get(payload); |
| 100 | |
| 101 | if (error) { |
| 102 | throw error; |
| 103 | } |
| 104 | |
| 105 | if (!data) { |
| 106 | throw new Error("No data returned from Resend"); |
| 107 | } |
| 108 | |
| 109 | return data; |
| 110 | }, |
| 111 | { |
| 112 | name: "Get Email", |
| 113 | params: payload, |
| 114 | properties: [ |
| 115 | { |
| 116 | label: "ID", |
| 117 | text: payload, |
| 118 | }, |
| 119 | ], |
| 120 | retry: retry.standardBackoff, |
| 121 | }, |
| 122 | handleResendError |
| 123 | ); |
| 124 | } |
| 125 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected