mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 19:46:32 +08:00
feat(server): introduce user friendly server errors (#7111)
This commit is contained in:
@@ -119,7 +119,7 @@ test('should not be able to sign in if email is invalid', async t => {
|
||||
.send({ email: '' })
|
||||
.expect(400);
|
||||
|
||||
t.is(res.body.message, 'Invalid email address');
|
||||
t.is(res.body.message, 'An invalid email provided.');
|
||||
});
|
||||
|
||||
test('should not be able to sign in if forbidden', async t => {
|
||||
@@ -130,7 +130,7 @@ test('should not be able to sign in if forbidden', async t => {
|
||||
await request(app.getHttpServer())
|
||||
.post('/api/auth/sign-in')
|
||||
.send({ email: u1.email })
|
||||
.expect(HttpStatus.BAD_REQUEST);
|
||||
.expect(HttpStatus.FORBIDDEN);
|
||||
|
||||
t.true(mailer.sendSignInMail.notCalled);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user