Skip to content

Better error messages for invalid URLs #565

@shaicoleman

Description

@shaicoleman
HTTP.get(nil)
HTTP::Request::UnsupportedSchemeError (unknown scheme: )

HTTP.get('')
HTTP::Request::UnsupportedSchemeError (unknown scheme: )

HTTP.get('/')
HTTP::Request::UnsupportedSchemeError (unknown scheme: )

HTTP.get(':')
Addressable::URI::InvalidURIError (Cannot assemble URI string with ambiguous path: ':')

Ideally it should return InvalidURI exceptions if the URL is invalid instead of UnsupportedSchemeError, as it is less confusing. Ideally also, it should return the same exception for all these cases

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions