Description
The ResendRetrieveError model may not cover all error response shapes returned by the Resend API.
Current model
public struct ResendRetrieveError: Codable, Sendable, Error {
public var statusCode: Int
public var message: String
public var name: String
}
Verified API responses
// Validation error
{"statusCode":400,"message":"Your plan includes 3 segments.","name":"validation_error"}
// Domain error
{"statusCode":403,"message":"domain has been registered already","name":"validation_error"}
// Not found
{"statusCode":422,"message":"Email is not scheduled","name":"validation_error"}
// Application error (500)
{"message":"Something went wrong","statusCode":500,"name":"application_error"}
The model currently works for all observed cases, but we should add tests for edge cases and possibly add an errors array field for batch errors.
Description
The
ResendRetrieveErrormodel may not cover all error response shapes returned by the Resend API.Current model
Verified API responses
The model currently works for all observed cases, but we should add tests for edge cases and possibly add an
errorsarray field for batch errors.