kintoneAPIException
Handle error responses from kintone Rest API
Methods
getHttpErrorCode()
Parameters
(none)
Return
Integer
Sample code
Get HTTP error code
Javascriptvar appID = {your_invalid_app_id}; kintoneApp.getApp(appID).catch(function(err) { // This SDK return err with KintoneAPIExeption console.log(err.getHttpErrorCode()); });Nodejs
let appID = {your_invalid_app_id}; kintoneApp.getApp(appID).catch((err) => { // This SDK return err with KintoneAPIExeption console.log(err.getHttpErrorCode()); });
getErrorResponse()
Parameters
(none)
Return
Sample code
Get error response
Javascriptvar appID = {your_invalid_app_id}; kintoneApp.getApp(appID).catch(function(err) { // This SDK return err with KintoneAPIExeption console.log(err.getErrorResponse()); });Nodejs
let appID = {your_invalid_app_id}; kintoneApp.getApp(appID).catch((err) => { // This SDK return err with KintoneAPIExeption console.log(err.getErrorResponse()); });
get()
Parameters
(none)
Return
Sample code
Get original error
Javascriptvar appID = {your_invalid_app_id}; kintoneApp.getApp(appID).catch(function(err) { // This SDK return err with KintoneAPIExeption console.log(err.get()); });Nodejs
let appID = {your_invalid_app_id}; kintoneApp.getApp(appID).catch((err) => { // This SDK return err with KintoneAPIExeption console.log(err.get()); });
getOriginError()
Parameters
(none)
Return
Object
Sample code
Get original error
Javascriptvar appID = {your_invalid_app_id}; kintoneApp.getApp(appID).catch(function(err) { // This SDK return err with KintoneAPIExeption console.log(err.getOriginError()); });Nodejs
let appID = {your_invalid_app_id}; kintoneApp.getApp(appID).catch((err) => { // This SDK return err with KintoneAPIExeption console.log(err.getOriginError()); });
Reference
- kintone REST API Overview
on developer network
- axios
on npmjs