Skip to content

v6.0.1

Compare
Choose a tag to compare
@C-D-Lewis C-D-Lewis released this 29 Apr 13:02
· 5 commits to master since this release
aac412b

Fixes

  • api - Fix a bug that produced a rejected Promise inside a catch block, instead of an Error, in async functions (restoring the same behaviour as was in v5.10). For example:
try {
  await operator.thng().create(payload);
} catch (err) {
  console.log(err.name);    // Error
  console.log(err.message); // EVRYTHNG API error

  const json = JSON.parse(err.message);
  console.log(json.errors[0]);  // The error message as usual
}