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

Getting NotFound error when using repos.createRelease api #524

Closed
bilal-fazlani opened this issue Jul 1, 2020 · 4 comments
Closed

Getting NotFound error when using repos.createRelease api #524

bilal-fazlani opened this issue Jul 1, 2020 · 4 comments

Comments

@bilal-fazlani
Copy link

bilal-fazlani commented Jul 1, 2020

When using repos api to create new release, I get NotFound error

val req = gh.repos.createRelease(
      "bilal-fazlani",
      "test-repo",
      "0.1.0",
      "0.1.0",
      "New features",
      None,
      Some(true),
      Some(false),
      Map.empty
    )

Code to run

    val response = req.unsafeRunSync()

    response.result match {
      case Left(e)  => 
        println(s"Something went wrong: ${e.getMessage}")
        e.printStackTrace
      case Right(r) => 
        println(r)
    }

output:

NotFoundError(Not Found, https://developer.github.com/v3/repos/releases/#create-a-release)

I have tried this for both public and private repose. Not sure what is NotFound

@bilal-fazlani bilal-fazlani changed the title Getting NotFound error when using repos api Getting NotFound error when using repos.createRelease api Jul 1, 2020
@fedefernandez
Copy link
Contributor

@bilal-fazlani the GitHub API sometimes returns a 404 when you don't have permissions for some resource. Could you please double check that you're using a good token?

@bilal-fazlani
Copy link
Author

Ok sure. I will check with a different token

@bilal-fazlani
Copy link
Author

Token was the issue. Apologies and thank you for the help.

@fedefernandez
Copy link
Contributor

No worries! Glad it was solved 👍

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

2 participants