in templates/nodejs/src/api-response.js [51:71]
get isSuccess(): boolean {
const body = this._body;
if ('error' in body) {
return false;
} else if (Object.keys(body).length !== 0) {
if ('success' in body) {
return body['success'];
}
return !('Service Unavailable' in body);
} else if (this._httpStatus === HTTP_STATUS.NOT_MODIFIED) {
// ETag Hit
return true;
} else if (this._httpStatus === HTTP_STATUS.OK) {
// HTTP OK
return true;
} else {
// Something else
return false;
}
}