Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

When calling package.createPackage() errors do not result in a rejected Promise #2

Description

@richclement

When calling package.createPackage(...) and an error is generated, the code does not reject the Promise. Instead the error bubbles up in the .then().

package.createPackage({
   packageName: 'name',
   packageDescription: 'description',
   metadata: [{tag: 'source', value: 'sec.gov'}] // tag is case sensitive and should be `Source`
}).then(res => {
   // res is the error returned from the server
}).catch(err => {
   // flow should go through catch
});

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