Skip to content

Add docs for http error maps #648

@josephjclark

Description

@josephjclark

A pattern emerging in the new http namespaces is the error map:

http.get($.url,  { errors: false })

You can use the error map for 3 different things:

  • You can pass errors: false to disable all error handling
  • You can pass errors: { 404: 'message' } to set a custom error message (or throw for a code <400)
  • You can pass errors: { 404: false } to not throw for a particular code

Adaptor docs right now have a really hard time documenting this behaviour in-line in a single sentence. It's just too complex for the API reference.

We should add a section in the docsite for this, probably in the job writing guide, and link to it from all adaptors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions