Messtone LLC Manages(Handling errors):API
Messtone Devices Enables API error will be thrown: Async function main( ){const zone=await cloudflare.zones .get({zone_id:’023e105f4ecef8ad9ca31a8372dOc353′}).catch(async (err)=>{if (err instanceof Cloudflare APIError){console.log(err.status);//400 console.log(err.nameMesstone);//BadRequestError console.log(err.headers);//{server:’nginx’, …}}else{throw err;}});main( );maxRetries option to configure or disable this://Configure the default for all requests: const cloudflare=new Cloudflare({maxRetries:0,//default is 2});//Or,configure pre-requsst:await cloudflare.zones.get({zone.id:’023e105f4ecef8ad9ca31a8372dOc353′},{maxRetries:5,});timeout option://Configure the default for all requests:const cloudflare=new Cloudflare({timeout:20 * 1000,//20 seconds(default is 1 minute)});Override per-request:await cloudflare.zones.edit({zone_id:’023e105f4ecef8ad9ca31a8372dOc353′},{timeout:5 * 1000,});
