-
Notifications
You must be signed in to change notification settings - Fork 214
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
Fetching with Authorization Header #1251
Comments
@JCSanPedro: Using a fake API token, could you provide the output of this command:
I haven't been able to reproduce the problem locally, but the output from that might help narrow down the problem. |
Thanks for the response.
|
@JCSanPedro: Does your Also, can you paste the error message that you are getting (with any sensitive information redacted)? My intuition here is that there might be something wrong with the API URL that you are using, but without knowing the path I can't say for certain. Other than that, the only thing I can think of is to forward your request through a local proxy that logs requests so that you can verify that the header and path look correct. |
The problem was that the github api requires a valid Not an issue with dhall itself, so I'll close this now, but would it be possible if it returned more than just the status code? Currently it returns
and the actual error message is
I initially just assumed I was setting the Cheers! |
I'll re-open this to improve the error message, but relocate this ticket to the |
Fixes #1251 This improves HTTP error messages by: * Expanding the set of recognized status codes * Adding up to 7 lines of the response body For example: ``` Error: Remote file missing URL: ↳ https://httpbin.org/statu Message: 1│ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 2│ <title>404 Not Found</title> 3│ <h1>Not Found</h1> 4│ <p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p> ```
The fix is up here: #1253 |
* Improve HTTP errors Fixes #1251 This improves HTTP error messages by: * Expanding the set of recognized status codes * Adding up to 7 lines of the response body For example: ``` Error: Remote file missing URL: ↳ https://httpbin.org/statu Message: 1│ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 2│ <title>404 Not Found</title> 3│ <h1>Not Found</h1> 4│ <p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p> ``` * Always include HTTP status code in output ... as suggested by @sjakobi * Use "not found" wording for 404 message This is closer to the official wording for the error message * Compress error message formatting There's no need to put the URL and status code on separate lines since they are compact
From what I understand, we can fetch files from a private github repository with the following:
but I'm getting a
403
error. I'm not sure what I'm doing wrong here, or what else I can do to debug this further. I have also triedAdditionally, the following curl command does work
The dhall version is
1.25.0
.Any help would be appreciated, thanks.
The text was updated successfully, but these errors were encountered: