v6.0.1
Fixes
- api - Fix a bug that produced a rejected
Promise
inside acatch
block, instead of anError
, inasync
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
}