Skip to content

No error handling for parse_from_url #83

@dfalling

Description

@dfalling

Currently parse_from_url is using .get!, causing an exception if the API call fails. It would be easier to handle these scenarios if an error type was returned instead, eg {:error, error}. I'm happy to take a stab at this in a PR.

  def parse_from_url(path, opts \\ []) do
    request_opts = Keyword.merge([follow_redirect: true, max_redirect: 5], opts)
    %HTTPoison.Response{body: wsdl} = HTTPoison.get!(path, [], request_opts)
    parse(wsdl, path, opts)
  end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions