Comments (3)
Well, what you got when an enrollment or authentication operation fails actually is an integer error code documented here. The promise is rejected with the corresponding error code. On your error handler callback, you have to make a big switch statement to isolate the returned error code just like the following gist: https://gist.github.com/symisc/34203d2811a39f2a871373abc6dd1ce9#file-faceio_integration_boilerplate-html-L95.
Please note that there is no this.handleError(errCode)
method implementation, you have to implement it yourself on your code base. Please remove that statement from your code to get it working. Check the gist above for a typical implementation of the handleError(errCode)
function.
from faceio-npm.
Sorry but your documentation doesn't states anything about integer error codes and actually the link you provided with the gist, is exactly the same way I've implemented the switch statement to handle errors, but obviously, if whats returned is an integer, how is the switch statement gonna work if it's expecting something else?
Like where is defined fioErrCode
?
This is not clear to me, and copying that code exactly as is, it's simply not working... please be more clear about it.
from faceio-npm.
Well, what you got when an enrollment or authentication operation fails actually is an integer error code documented here. The promise is rejected with the corresponding error code. On your error handler callback, you have to make a big switch statement to isolate the returned error code just like the following gist: https://gist.github.com/symisc/34203d2811a39f2a871373abc6dd1ce9#file-faceio_integration_boilerplate-html-L95.
Please note that there is no
this.handleError(errCode)
method implementation, you have to implement it yourself on your code base. Please remove that statement from your code to get it working. Check the gist above for a typical implementation of thehandleError(errCode)
function.
If what you mean is that we should asumme that the error list provided here is listed in order meaning that the first one would be the errorCode 1, the second one the errorCode 2, and so on, that it's absolutely not clear, and you should either provide a better, cleaner and understandable documentation or change these errorCodes to their respective string names as many other API usually do.
from faceio-npm.
Related Issues (11)
- [FEATURE REQUEST] Choose between available cameras HOT 2
- No payload is beign saved when enrolling users HOT 2
- Uncaught SyntaxError: Identifier 'fioErrCode' has already been declared HOT 1
- ReferenceError: Can't find variable: document HOT 2
- Waiting timeout - Enrollment process is too slow HOT 3
- Enroll and Authentication reset state HOT 2
- De-branding HOT 2
- Unclear Metrics HOT 1
- Error Handling!!! HOT 9
- Livneness Detection & Face Anti-Spoofing should be included in starter plans HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faceio-npm.