Skip to content

kintoneAPIException

Handle error responses from kintone Rest API

Methods

getHttpErrorCode()

Parameters

(none)

Return

Integer

Sample code

Get HTTP error code Javascript

    var 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

Error Response

Sample code

Get error response Javascript

    var 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

Error Response

Sample code

Get original error Javascript

    var 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 Javascript

    var 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