We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1f691c commit 6ca398dCopy full SHA for 6ca398d
myhaki/src/app/api/users/[id]/route.ts
@@ -23,10 +23,10 @@ export async function GET(request: NextRequest) {
23
status: response.status,
24
headers: { 'Content-Type': 'application/json' },
25
});
26
- } catch (error: any) {
27
- return new Response(JSON.stringify({ error: error.message }), {
+ } catch (error) {
+ return new Response(JSON.stringify({ error: (error as Error).message }), {
28
status: 500,
29
- headers: { 'Content-Type': 'application/json' },
+ headers: { 'Content-Type': 'application/json' }
30
31
}
32
0 commit comments