Skip to content

HttpError: Not found #1974

Answered by gr2m
henild asked this question in Q&A
Dec 20, 2020 · 2 comments · 8 replies
Discussion options

You must be logged in to vote

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
})

Replies: 2 comments 8 replies

This comment has been hidden.

Comment options

You must be logged in to vote
8 replies
@gr2m
Comment options

@henild
Comment options

@gr2m
Comment options

@henild
Comment options

@gr2m
Comment options

Answer selected by henild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants