2023-08-01 11:49:50 -04:00
|
|
|
export const errorStub = {
|
|
|
|
unauthorized: {
|
|
|
|
error: 'Unauthorized',
|
|
|
|
statusCode: 401,
|
|
|
|
message: 'Authentication required',
|
|
|
|
},
|
2023-09-01 22:01:54 -04:00
|
|
|
forbidden: {
|
|
|
|
error: 'Forbidden',
|
|
|
|
statusCode: 403,
|
|
|
|
message: expect.any(String),
|
|
|
|
},
|
2023-08-01 11:49:50 -04:00
|
|
|
wrongPassword: {
|
|
|
|
error: 'Bad Request',
|
|
|
|
statusCode: 400,
|
|
|
|
message: 'Wrong password',
|
|
|
|
},
|
|
|
|
invalidToken: {
|
|
|
|
error: 'Unauthorized',
|
|
|
|
statusCode: 401,
|
|
|
|
message: 'Invalid user token',
|
|
|
|
},
|
2023-09-18 17:56:50 +02:00
|
|
|
invalidShareKey: {
|
|
|
|
error: 'Unauthorized',
|
|
|
|
statusCode: 401,
|
|
|
|
message: 'Invalid share key',
|
|
|
|
},
|
2023-08-01 11:49:50 -04:00
|
|
|
badRequest: {
|
|
|
|
error: 'Bad Request',
|
|
|
|
statusCode: 400,
|
|
|
|
message: expect.any(Array),
|
|
|
|
},
|
2023-09-04 22:25:31 -04:00
|
|
|
noPermission: {
|
|
|
|
error: 'Bad Request',
|
|
|
|
statusCode: 400,
|
|
|
|
message: expect.stringContaining('Not found or no'),
|
|
|
|
},
|
2023-08-01 11:49:50 -04:00
|
|
|
incorrectLogin: {
|
|
|
|
error: 'Unauthorized',
|
|
|
|
statusCode: 401,
|
|
|
|
message: 'Incorrect email or password',
|
|
|
|
},
|
|
|
|
alreadyHasAdmin: {
|
|
|
|
error: 'Bad Request',
|
|
|
|
statusCode: 400,
|
|
|
|
message: 'The server already has an admin',
|
|
|
|
},
|
|
|
|
};
|