docs icon indicating copy to clipboard operation
docs copied to clipboard

Add docs for http error maps

Open josephjclark opened this issue 9 months ago • 0 comments

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

josephjclark avatar Mar 14 '25 10:03 josephjclark