Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

settingsGistIdの値が不正な場合、500エラーになる #15

Open
MH4GF opened this issue Oct 20, 2023 · 0 comments
Open

settingsGistIdの値が不正な場合、500エラーになる #15

MH4GF opened this issue Oct 20, 2023 · 0 comments

Comments

@MH4GF
Copy link
Owner

MH4GF commented Oct 20, 2023

背景

問い合わせをいただいた

github-nippouでrunを押したらこういうエラーが出たのですが、どうしたら良いでしょうか:ぐる目顔:
github-nippou-web.vercel.app/:1
       Failed to load resource: the server responded with a status of 500 ()
786-3264ade908fd4734.js:1 Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.
window.console.error

VercelのServer Componentのログ
サーバーから返却されるレスポンスがおかしいっぽい 👀

SyntaxError: Unexpected token I in JSON at position 0
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:6662:19)
    at successSteps (node:internal/deps/undici/undici:6636:27)
    at node:internal/deps/undici/undici:1236:60
    at node:internal/process/task_queues:140:7
    at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
    at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

apiのログ
gistの取得にエラーが出ている 👀

Oct 20 04:04:33 PM  {"time":"2023-10-20T07:04:33.276316272Z","level":"ERROR","msg":"GET https://api.github.com/gists/@[問い合わせいただいた方のユーザー名]: 404 Not Found []"}

→ gistIdの入力フォームを空にしてRunを押してもらうと動いた

概要

gistの取得で404になった場合、適切なエラーメッセージを返したい

@MH4GF MH4GF mentioned this issue Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant