Skip to content
Snippets Groups Projects
Unverified Commit eb578146 authored by choco's avatar choco Committed by GitHub
Browse files

fix(users/show): ユーザーが見つからなかった場合に404ステータスコードを返す (#10344)

* fix(users/show): ユーザーが見つからなかった場合に404ステータスコードを返す

* test(users/show): ステータスコードの期待値を修正
parent 3014e3e5
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,7 @@ export const meta = {
message: 'No such user.',
code: 'NO_SUCH_USER',
id: '4362f8dc-731f-4ad8-a694-be5a88922a24',
httpStatusCode: 404,
},
},
} as const;
......
......@@ -162,14 +162,14 @@ describe('Endpoints', () => {
const res = await api('/users/show', {
userId: '000000000000000000000000',
});
assert.strictEqual(res.status, 400);
assert.strictEqual(res.status, 404);
});
test('間違ったIDで怒られる', async () => {
const res = await api('/users/show', {
userId: 'kyoppie',
});
assert.strictEqual(res.status, 400);
assert.strictEqual(res.status, 404);
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment