HttpError: Not found
#1974
-
I am trying to do something like this: const response = await octokit.request('GET /user/starred/{owner}/{repo}', {
owner: "octocat",
repo: "hello-world"
}) but getting error
Simple endpoints like |
Beta Was this translation helpful? Give feedback.
Answered by
gr2m
Dec 20, 2020
Replies: 2 comments 8 replies
This comment has been hidden.
This comment has been hidden.
-
Turns out it's expected behavior, but I agree it's confusing. See the docs You can do the following const isStarred = await octokit.request('GET /user/starred/{owner}/{repo}', {
owner: "octocat",
repo: "hello-world"
}).then(() => true, error => {
if (error.status === 404) return false
throw error
}) |
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected by
henild
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Turns out it's expected behavior, but I agree it's confusing.
See the docs
You can do the following