Auto-commit 2026-04-29 16:31

This commit is contained in:
2026-04-29 16:31:27 -04:00
parent e8687bb6b2
commit 0495ee5bd2
19691 changed files with 3272886 additions and 138 deletions

33
node_modules/twilio/lib/base/RestException.js generated vendored Normal file
View File

@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class RestException extends Error {
constructor(response) {
super("[HTTP " + response.statusCode + "] Failed to execute request");
const isResponseBodyString = typeof response.body == "string";
const body = isResponseBodyString
? parseResponseBody(response.body)
: response.body;
this.status = response.statusCode;
if (body !== null) {
this.message = body.message;
this.code = body.code;
this.moreInfo = body.more_info; /* jshint ignore:line */
this.details = body.details;
}
else {
this.message =
"[HTTP " + response.statusCode + "] Failed to execute request";
}
}
}
exports.default = RestException;
function parseResponseBody(response_body) {
let body = null;
try {
body = JSON.parse(response_body);
}
catch (catchError) {
body = null;
}
return body;
}