Class FdkError

Thrown for every non-2xx API response. message is unchanged (title\ndetail\nverbose of the ec error body), on top it carries the HTTP status, the ec error code (e.g. 2112) and the parsed error body as info.

try {
await fdk("stage").dm("83cc6374").model("muffin").editEntrySafe(id, { name: "x", _modified });
} catch (err) {
if (isStaleWriteError(err)) { ... } // someone else saved in between
}

Hierarchy

  • Error
    • FdkError

Constructors

Properties

status: number
code?: number
info?: any
name: string
message: string
stack?: string