How to use the @slack/client.ErrorCode.PlatformError function in @slack/client

To help you get started, we’ve selected a few @slack/client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JakeWharton / decorp / src / index.js View on Github external
.catch(function (error) {
      if (error.code === ErrorCode.PlatformError) {
        // a platform error occurred, `error.message` contains error information, `error.data` contains the entire resp
        console.error(error.message);
        console.info(error.data);
      } else {
        // some other error occurred
        console.error(error);
      }
    });
}