Skip to content

Middleware OnError wrap docs wrong #2517

@sxndmxn

Description

@sxndmxn

openapi-fetch version

0.15

Description

Docs for wrap error throwing syntax error

async onError({ error }) { // wrap errors thrown by fetch onError({ error }) { throw new Error("Oops, fetch failed", { cause: error }); }, }

Cannot find name 'onError'. Did you mean 'error'?ts(2552)

Reproduction

Reading docs and copy pasting

Expected result

Cannot find name 'onError'. Did you mean 'error'?ts(2552)

Extra

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopenapi-fetchRelevant to the openapi-fetch library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions