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

Changed token creation to URL - Encoded #2

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Conversation

vxirau
Copy link

@vxirau vxirau commented Jul 15, 2024

For some reason, when trying to create a new token it resulted in an error:

goroutine 1 [running]:
log.Panic({0x1400014fcf0?, 0x0?, 0x0?})
/home/migue/.asdf/installs/golang/1.20.5/go/src/log/log.go:384 +0x64
github.com/Madh93/toffu/cmd.glob..func5(0x1013e7c80?, {0x10100d264?, 0x0?, 0x0?})
/home/migue/Workspace/repos/toffu/cmd/token.go:17 +0x5c
github.com/spf13/cobra.(*Command).execute(0x1013e7c80, {0x1014257e8, 0x0, 0x0})
/home/migue/.go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x1013e76c0)
/home/migue/.go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
/home/migue/.go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
github.com/Madh93/toffu/cmd.Execute(...)
/home/migue/Workspace/repos/toffu/cmd/root.go:31
main.main()
/home/migue/Workspace/repos/toffu/main.go:11 +0x40

And when digging into it, it was a result of the petition always getting status code 403: Forbidden.

For some reason, simply changing content type from application/json to url-encoded fixed the problem.

@Madh93
Copy link
Owner

Madh93 commented Jul 15, 2024

Thank you for identifying this issue 😃

@Madh93 Madh93 merged commit 9bb117d into Madh93:main Jul 15, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants