MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / failTask

Method failTask

packages/trigger-sdk/src/apiClient.ts:190–211  ·  view source on GitHub ↗
(runId: string, id: string, body: FailTaskBodyInput)

Source from the content-addressed store, hash-verified

188 }
189
190 async failTask(runId: string, id: string, body: FailTaskBodyInput) {
191 const apiKey = await this.#apiKey();
192
193 this.#logger.debug("Fail Task", {
194 id,
195 runId,
196 body,
197 });
198
199 return await zodfetch(
200 ServerTaskSchema,
201 `${this.#apiUrl}/api/v1/runs/${runId}/tasks/${id}/fail`,
202 {
203 method: "POST",
204 headers: {
205 "Content-Type": "application/json",
206 Authorization: `Bearer ${apiKey}`,
207 },
208 body: JSON.stringify(body),
209 }
210 );
211 }
212
213 async sendEvent(event: SendEvent, options: SendEventOptions = {}) {
214 const apiKey = await this.#apiKey();

Callers 1

executeTaskMethod · 0.80

Calls 3

#apiKeyMethod · 0.95
zodfetchFunction · 0.70
debugMethod · 0.65

Tested by

no test coverage detected