We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7093ff commit 1dfcc64Copy full SHA for 1dfcc64
src/helpers.ml
@@ -154,18 +154,13 @@ let download_cps ~uri ~with_file =
154
| Some new_uri ->
155
inner_download new_uri
156
| None ->
157
- let msg =
158
- Printf.sprintf "Redirected from %s, but no Location header found"
159
- (Uri.to_string uri)
160
- in
161
- Lwt.return_error msg )
162
- | status_code ->
163
164
- Printf.sprintf "HTTP request to %s failed with status code: %s"
+ f "Redirected from %s, but no Location header found"
165
(Uri.to_string uri)
166
- (Code.string_of_status status_code)
167
168
- Lwt.return_error msg
+ |> Lwt.return_error )
+ | status_code ->
+ f "HTTP request to %s failed with status code: %s" (Uri.to_string uri)
+ (Code.string_of_status status_code)
+ |> Lwt.return_error
169
in
170
inner_download uri
171
0 commit comments