Skip to content

Commit

Permalink
Fix a bug where `Multiple_choices was considered an error for Subscri…
Browse files Browse the repository at this point in the history
…ption.create_for_url
  • Loading branch information
brendanlong committed Sep 4, 2018
1 parent fff5239 commit 1376307
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions feedbin_client_lwt/src/subscription.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ let create_for_url client feed_url =
{ Subscription.feed_url }
|> Subscription.create_to_string
in
Client.call ~data ~ok_statuses:[ `Created ; `Found ; `Not_found ] `POST client
~path
Client.call ~data
~ok_statuses:[ `Created ; `Found ; `Not_found ; `Multiple_choices ]
`POST client ~path
>|= Result.bind ~f:(fun (status, body) ->
match status with
| `Not_found -> Ok None
Expand Down

0 comments on commit 1376307

Please sign in to comment.