README
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