Skip to content

http responses for invalid numbers #3

@kaashyapan

Description

@kaashyapan
❯ curl -X POST http://xxx.xx.xx.xxxx:8080/validate -H "Content-Type: application/json" -d '{"phone_number": "+14155552671"}'
{"valid":true,"possible":true,"type":"FIXED_LINE_OR_MOBILE","country_code":1,"national_number":4155552671,"region":"US","e164_format":"+14155552671","international_format":"+1 415-555-2671","national_format":"(415) 555-2671","possibility_reason":"IS_POSSIBLE"}

❯ curl -X POST http://xxx.xx.xx.xxxx:8080/validate -H "Content-Type: application/json" -d '{"phone_number": "+91155551"}'
curl: (52) Empty reply from server

http socket closes unexpectedly when number is invalid. Should it return a json error message ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions