Closed chingan-tsc closed 5 years ago
I actually agree with you, it is indeed a convention to add a bang for functions that raise exceptions. You should raise this concern in the bamboo repo since they decide what the interface for adapters is.
Will reopen this issue when bamboo addresses this!
Hi, this may sound opinionated but IMHO I think the return of
deliver/2
is inconsistent as I believe its a convention to append a ! (bang) to the routines that'll raise an exception. In other words, do you its sane to change the currentdeliver/2
todeliver!/2
and add anotherdeliver/2
that'll return{:ok, %{status_code: status, headers: headers, body: response}}
or{:error, :api_error}.
I understand that'll require change on the Bamboo codebase as well but what do you think?
P/S: I can help in submitting the PR should you agree to make the change.