code improvements
This commit is contained in:
@@ -1,26 +1,30 @@
|
||||
const constants = {};
|
||||
|
||||
constants.amazonResultCodes = {
|
||||
ok:200,
|
||||
accepted:202,
|
||||
badRequest:400,
|
||||
unauthorized:401,
|
||||
notFound:404,
|
||||
conflict:409,
|
||||
payloadTooLarge:413
|
||||
OK:200,
|
||||
ACCEPTED:202,
|
||||
BAD_REQUEST:400,
|
||||
UNAUTHORIZED:401,
|
||||
NOT_FOUND:404,
|
||||
CONFLICT:409,
|
||||
PAYLOAD_TOO_LARGE:413
|
||||
}
|
||||
|
||||
constants.apiResultCodes = {
|
||||
genericError : -1,
|
||||
ok:0,
|
||||
amazonError:1, //amazon api works, but error is some of the amazonResultCodes
|
||||
amazonFail:2, //amazon api doesn't work
|
||||
databaseError:3,
|
||||
noSkill:4,
|
||||
inconsistentState:5,
|
||||
GENERIC_ERROR : -1,
|
||||
OK:0,
|
||||
AMAZON_ERROR:1, //amazon api works, but error is some of the amazonResultCodes
|
||||
AMAZON_FAIL:2, //amazon api doesn't work
|
||||
DATABASE_ERROR:3,
|
||||
NO_SKILL:4,
|
||||
INCONSISTEN_STATE:5,
|
||||
}
|
||||
|
||||
constants.skillIDLength = 24;
|
||||
constants.HTTPResultCodes = {
|
||||
INTERNAL_SERVER_ERROR : 500,
|
||||
}
|
||||
|
||||
constants.SKILL_ID_LENGTH = 24;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user