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

"is not a legal HTTP header value" errors when syncing docs #816

Closed
vegaro opened this issue Jun 2, 2023 · 4 comments · Fixed by #817 or #818
Closed

"is not a legal HTTP header value" errors when syncing docs #816

vegaro opened this issue Jun 2, 2023 · 4 comments · Fixed by #817 or #818
Labels
bug Something isn't working command:docs Issues pertaining to the `docs`, `changelogs`, or `custompages` commands command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands

Comments

@vegaro
Copy link

vegaro commented Jun 2, 2023

When calling the docs command in GitHub, we hit this error:

[21:51:00]: Exit status of command 'rdme docs rendered_docs --version=v5.0 --key=***' was 1 instead of 0.
Error: Error uploading rendered_docs/📈 Dashboard & Metrics/charts/annual-recurring-revenue-arr-chart.md:

[https://github.com/RevenueCat/revenuecat-docs/blob/35ebea8359c25fc4427aa5f965e07c5e29219414/rendered_docs/📈](https://github.com/RevenueCat/revenuecat-docs/blob/35ebea8359c25fc4427aa5f965e07c5e29219414/rendered_docs/%F0%9F%93%88) Dashboard & Metrics/charts/annual-recurring-revenue-arr-chart.md is not a legal HTTP header value

Looking at the debug logs, we see headers like these:

::debug::rdme: making POST request to https://dash.readme.com/api/v1/docs with headers: {"Authorization":["redacted"],"content-type":["application/json"],"x-readme-version":["5.0"],"User-Agent":["rdme-github/8.6.3"],"x-github-repository":["RevenueCat/revenuecat-docs"],"x-github-run-attempt":["1"],"x-github-run-id":["5149552673"],"x-github-run-number":["12"],"x-github-sha":["redacted"],"x-readme-source-url":["https://github.com/RevenueCat/revenuecat-docs/blob/35ebea8359c25fc4427aa5f965e07c5e29219414/rendered_docs/Transactions - Purchases/defer-a-google-subscription-old.md"],"x-rdme-ci":["GitHub Actions"],"x-readme-source":["cli-gh"]}

We suspect it is probably due to the folder name 📈 Dashboard & Metrics not being encoded correctly when generating the x-readme-source-url.

@kanadgupta kanadgupta added the bug Something isn't working label Jun 2, 2023
@kanadgupta
Copy link
Member

Appreciate the debug logs, @vegaro! I was able to reproduce the issue and have a fix up in #817. Will keep you updated on when it's released!

@kanadgupta kanadgupta added command:docs Issues pertaining to the `docs`, `changelogs`, or `custompages` commands command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands labels Jun 2, 2023
@kanadgupta
Copy link
Member

kanadgupta commented Jun 2, 2023

Just tagged v8.6.4-next.2 — feel free to play around with it and see if it fixes your issue. Will tag a general release on Monday and update this issue once that’s live!

@vegaro
Copy link
Author

vegaro commented Jun 3, 2023

I tested it and it works fine! Thanks for the quick turnaround

@kanadgupta
Copy link
Member

Hi @vegaro, v8.6.4 is live in the GitHub and npm registries with this fix:

https://github.com/readmeio/rdme/releases/tag/8.6.4
https://www.npmjs.com/package/rdme/v/8.6.4

If you're using GitHub Actions and you're pointed to readmeio/rdme@v8, you should automatically see this fix. Thanks again for writing in about this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working command:docs Issues pertaining to the `docs`, `changelogs`, or `custompages` commands command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands
Projects
None yet
2 participants