Skip to content

Axios rejections don't filter through into promise rejection for 503.  #2

@rageycomma

Description

@rageycomma

This is something I've noticed using oas-client when the service I'm pinging all of a sudden goes down, axios returns the 503, but oas-client doesn't filter that back through to the created client.

 const client = oasClient.create(schema); 
 client.doAction({ ... }).then((s) => {})
 .catch((e) => {}); // Never gets called on 503

Checking, it looks like the path lib/make-api-call.js:makeApiCall is the cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions