Skip to content

kintoneAPIException

Handle error responses from kintone Rest API

Methods

get()

Parameter

(none)

Return

Kintone Error Response

Sample code

Get app with error response

Javascript


    var appID = {your_invalid_app_id};
    kintoneApp.getApp(appID).catch((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());
    });

Response

    {
        "id":"kintone_error_id",
        "code":"{kintone_error_code}",
        "message":"{kintone_error_message}",
        "errors": [
            /*errors items here*/
        ]

    }

getAll()

Parameter

(none)

Return

The result of Promise.Reject()

Sample code

Get apps with error response

Javascript


    var appID = {your_invalid_app_id};
    kintoneApp.getApp(appID).catch((err) => {
    // This SDK return err with KintoneAPIExeption
    console.log(err.getAll());
    });

Nodejs


    let appID = {your_invalid_app_id};
    kintoneApp.getApp(appID)
        .catch((err) => {
            // This SDK return err with KintoneAPIExeption
            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

Parameter

(none)

Return

(none)

Reference