tripadvisor_api_module_v1
Version:
TripAdvisor API Module
30 lines • 1.09 kB
JavaScript
export class ErrorTripadvisorAPI extends Error {
static ERROR_CODE = {
NO_SUCH_CONTENT_TYPE: 1,
FAILED_TO_GENERATE_URL: 2,
NOTHING_RETURNED_FROM_YOUTUBE_SERVER: 3,
ERROR_OBJECT_RETURNED: 4,
RESULT_IS_ZERO: 5,
QUOTA_EXCEEDED: 6,
};
static ERROR_MSG = {
NO_SUCH_CONTENT_TYPE: "No such type of content",
FAILED_TO_GENERATE_URL: "Failed to generate YouTube API Url",
NOTHING_RETURNED_FROM_YOUTUBE_SERVER: "Nothing returned from YouTube API server",
ERROR_OBJECT_RETURNED: "Error object returned from YouTube API server",
RESULT_IS_ZERO: "YouTube API data contains 0(zero) result",
QUOTA_EXCEEDED: "YouTube API Quota Exceeded",
};
// Error code of Google Place API
code = null;
constructor(msg, code) {
super(msg);
if (code) {
this.code = code;
}
// Set the prototype explicitly.
// TODO: What is this!
Object.setPrototypeOf(this, new.target.prototype);
}
}
//# sourceMappingURL=error-google-place-api.js.map