100 lines
5.3 KiB
TypeScript
100 lines
5.3 KiB
TypeScript
/*
|
|
███████╗███╗ ██╗██╗ ██╗███╗ ███╗
|
|
██╔════╝████╗ ██║██║ ██║████╗ ████║
|
|
█████╗ ██╔██╗ ██║██║ ██║██╔████╔██║
|
|
██╔══╝ ██║╚██╗██║██║ ██║██║╚██╔╝██║
|
|
███████╗██║ ╚████║╚██████╔╝██║ ╚═╝ ██║
|
|
╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝
|
|
*/
|
|
|
|
/*
|
|
██████╗ ██████╗ ███╗ ███╗██████╗ ██████╗ ███╗ ██╗███████╗███╗ ██╗████████╗███████╗
|
|
██╔════╝██╔═══██╗████╗ ████║██╔══██╗██╔═══██╗████╗ ██║██╔════╝████╗ ██║╚══██╔══╝██╔════╝
|
|
██║ ██║ ██║██╔████╔██║██████╔╝██║ ██║██╔██╗ ██║█████╗ ██╔██╗ ██║ ██║ ███████╗
|
|
██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██║ ██║██║╚██╗██║██╔══╝ ██║╚██╗██║ ██║ ╚════██║
|
|
╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ╚██████╔╝██║ ╚████║███████╗██║ ╚████║ ██║ ███████║
|
|
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝
|
|
*/
|
|
|
|
export const seedErrorConfig = {
|
|
/* HTTP like errors */
|
|
404: 'The document was not found',
|
|
4040: 'The ressource ${obj.ressourceId} for the model ${obj.ressourceModel} does not exists',
|
|
4041: 'The id "${id}" for the model "${model}" was not found',
|
|
|
|
/* ************* */
|
|
/* General & DB */
|
|
/* ************* */
|
|
1000: 'General database error',
|
|
1001: 'The document was not deleted',
|
|
1002: 'This action is not allowed',
|
|
|
|
/* ************* */
|
|
/* Permissions - Accounts & Organisation */
|
|
/* ************* */
|
|
|
|
// Accounts
|
|
2000: 'Your permissions level are not allowed',
|
|
2002: 'Authorization headers are required for this action',
|
|
2003: 'The account is already registered',
|
|
2004: 'We have no records of your account in our database',
|
|
2005: 'There was an error creating your account',
|
|
2006: 'The password confirmation you entered is incorrect',
|
|
20060: 'The old confirmation you entered is incorrect',
|
|
2007: 'There was an error updating your permission',
|
|
|
|
// Firebase
|
|
2010: 'Your login failed. Please verify your credentials',
|
|
2011: 'We had issues with your token. Please retry',
|
|
2012: 'We had issues creating your account. Please retry',
|
|
2013: 'There was an issue with the autentication provider',
|
|
2015: "Linking your account didn't work. Please contact administrator",
|
|
|
|
// Organisations
|
|
2100: 'Your permissions on the organisation level are not allowed',
|
|
2101: "Your account doesn't operate in that organisation",
|
|
2102: 'Organisation headers are required for this action',
|
|
|
|
// Api keys
|
|
2200: 'Your api keys are not in our system',
|
|
2202: 'Api keys are required for this action',
|
|
|
|
// Codes
|
|
2300: 'The code you entered does not exists',
|
|
2301: 'The code you entered has expired',
|
|
2302: 'Too many attempts, please retry in 15 mins',
|
|
|
|
/* ************* */
|
|
/* Security */
|
|
/* ************* */
|
|
2400: 'You need to complete security protocols before doing that action',
|
|
|
|
/* ************* */
|
|
/* DataValidation */
|
|
/* ************* */
|
|
|
|
3000: 'There are some inputs missing',
|
|
3001: 'This is a validation error',
|
|
|
|
3005: 'There was an error with the errors range time',
|
|
|
|
// -- Forms
|
|
3100: 'Items are required for that form type',
|
|
3101: 'The form has duplicate name entries',
|
|
3102: "The section '${sName}' for this form doesn't exists",
|
|
3103: "The question '${qName}' for the section '${sName}' for this form doesn't exists",
|
|
3104: "The answers of the section '${sectionName}' doesn't exists",
|
|
31040: "The answer ${fieldName} of the section '${sectionName}' doesn't exists",
|
|
3105: 'The answer "${name}" for this field "${formName}" is not acceptable',
|
|
|
|
3106: "The tab ${tabName} for this form doesn't exists",
|
|
3107: 'Please select a section to answer',
|
|
3108: 'Some input are missing, ${name} for section ${sectionName}',
|
|
3109: 'Data integrity breach, ${name} should be ${type}',
|
|
3110: 'Only one answer (key) please',
|
|
|
|
// -- Files
|
|
3200: 'System cannot read the extension of the file',
|
|
3201: 'The file extensions are not allowed - allowed : ${allowedMime}',
|
|
};
|