1.0.8 • Published 4 years ago

smart-errors v1.0.8

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

smart-errors

Make api calls to return possible solutions to errors on apps. Part of AI on Cloud challenge.

How to install

 $ npm install smart-errors

How to use

First, I will need to import the library on your app:

const smartErrors = require('smart-errors');

// or es6 format
import smartErrors from 'smart-errors';

To call the indentify solutions method:

  // an error or errors has being thrown...

  smartErrors.identifySolutions(url, errors)
    .then(solutions => console.log(solutions))
    .catch(err => console.log(err));

Params:

  • url: link to your instance of smart-errors-solutions API;
  • errors: can be a error or an array of errors

Response format:

[
  {
    "error_message": "some error occurred",
    "possible_solutions": [
      {
        "solution": "solution 1",
        "confidence": 0.95
      },
      {
        "solution": "solution 2",
        "confidence": 0.05
      }
    ],
    "most_likely_solution": "solution 1"
  }
]

Members

  • Keyla M. S. Santos
  • Luiz C. M. Caldeirão
  • Raphael G. Amorim
  • Rogério C. B. Silva
  • Thiago O. Pires
1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago