send reason code as part of details

This commit is contained in:
Girish Ramakrishnan
2019-09-01 21:22:46 -07:00
parent d59c1f53b9
commit 5fd129e509

View File

@@ -143,7 +143,7 @@ function AppsError(reason, errorOrMessage, details) {
this.nestedError = errorOrMessage;
}
if (details) error.details = details;
this.details = _.extend({ reason }, details || {});
}
util.inherits(AppsError, Error);
AppsError.INTERNAL_ERROR = 'Internal Error';