kintoneAPIException
Handle error responses from kintone Rest API
Methods
get()
Parameters
(none)
Return
Sample code
Get app with error response
Javascriptvar id = YOUR_APP_ID; kintoneApp.getApp({id}).then((rsp) => { console.log(rsp); }).catch((err) => { // This SDK return err with KintoneAPIException console.log(err.get()); });Nodejs
let id = YOUR_APP_ID; kintoneApp.getApp({id}).then((rsp) => { console.log(rsp); }).catch((err) => { // This SDK return err with KintoneAPIException console.log(err.get()); });Response
{ "id":"KINTONE_ERROR_ID", "code":"KINTONE_ERROR_CODE", "message":"KINTONE_ERROR_MESSAGE", "errors": [ /*errors items here*/ ] }
getAll()
Parameters
(none)
Return
The result of Promise.Reject()
Sample code
Get apps with error response
Javascriptvar id = YOUR_APP_ID; kintoneApp.getApp({id}).then((rsp) => { console.log(rsp); }).catch((err) => { // This SDK return err with KintoneAPIException console.log(err.getAll()); });Nodejs
let id = YOUR_APP_ID; kintoneApp.getApp({id}).then((rsp) => { console.log(rsp); }).catch((err) => { // This SDK return err with KintoneAPIException console.log(err.getAll()); });Response
// Response error object
throw()
This function will throw result of get() function
Parameter
(none)
Return
(none)
throwAll()
This function will throw result of getAll() function
Parameters
(none)
Return
(none)
Reference
- kintone REST API Overview
on developer network
- axios
on npmjs