How to use the fumble.create function in fumble

To help you get started, we’ve selected a few fumble 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 recruit-tech / redux-pluto / src / server / services / utils.js View on Github external
response => {
      const responseBody = response.data;
      if (!responseBody || !responseBody.results) {
        return rejectWith(fumble.create(), {
          name,
          formattedUrl,
          reason: "no result"
        });
      }

      const { results } = responseBody;
      if (results.error) {
        const { code, message } = results.error;
        return rejectWith(fumble.create(code, message), { name, formattedUrl });
      }

      return results;
    },
    error => rejectWith(fumble.create(), { name, formattedUrl, reason: error.message })
github recruit-tech / redux-pluto / src / server / services / utils.js View on Github external
response => {
      const responseBody = response.data;
      if (!responseBody || !responseBody.results) {
        return rejectWith(fumble.create(), {
          name,
          formattedUrl,
          reason: "no result"
        });
      }

      const { results } = responseBody;
      if (results.error) {
        const { code, message } = results.error;
        return rejectWith(fumble.create(code, message), { name, formattedUrl });
      }

      return results;
    },
    error => rejectWith(fumble.create(), { name, formattedUrl, reason: error.message })
github recruit-tech / redux-pluto / src / server / services / utils.js View on Github external
    error => rejectWith(fumble.create(), { name, formattedUrl, reason: error.message })
  );

fumble

Simple error objects in node. Created specifically to be used with the fetchr library and based on hapi.js' Boom.

Unknown
Latest version published 3 years ago

Package Health Score

43 / 100
Full package analysis

Popular fumble functions