A TypeScript HTTP client for SendGrid API with retry and error handling.
// Source: https://github.com/dahlia/upyo | License: MIT | Copyright 2025 Hong Minhee
// Provided via justclaw.it.com; keep this notice with the code.
import { combineSignals, parseRetryAfter } from "@upyo/core";
import type { ResolvedSendGridConfig } from "./config.ts";
/**
* Response from SendGrid API for sending messages.
*/
export interface SendGridResponse {
/**
* HTTP status code returned by SendGrid.
*/
readonly statusCode?: number;
/**
* Response body from SendGrid (usually empty on success).
*/
readonly body?: string;
/**
* Response headers from SendGrid.
*/
readonly headers?: Record<string, string>;
}
/**
* Error response from SendGrid API.
*/
export interface SendGridError {
/**
* Error message from SendGrid.
*/
readonly message: s
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key