Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phone Lookup failing when phone number have space in it #399

Closed
jubinpyli opened this issue Jan 12, 2018 · 2 comments · Fixed by #494
Closed

Phone Lookup failing when phone number have space in it #399

jubinpyli opened this issue Jan 12, 2018 · 2 comments · Fixed by #494
Labels
code-generation issue deals with generated code difficulty: easy fix is easy in difficulty type: bug bug in the library type: twilio enhancement feature request on Twilio's roadmap

Comments

@jubinpyli
Copy link

Note: These issues are for bugs and feature requests for the helper libraries.
If you need help or support, please email [email protected] and one of our experts
will assist you!

Version:7.17.0

Code Snippet

`
Twilio.init("SSID", "TOKEN");

    com.twilio.rest.lookups.v1.PhoneNumber number = com.twilio.rest.lookups.v1.PhoneNumber
        .fetcher(new com.twilio.type.PhoneNumber("(123) 456-7890"))
          .fetch();
    System.out.println(number.getPhoneNumber());
    System.out.println(number.getNationalFormat());

`

Exception/Log

Exception in thread "main" com.twilio.exception.ApiException: The requested resource /PhoneNumbers/(123)456-7890 was not found at com.twilio.rest.lookups.v1.PhoneNumberFetcher.fetch(PhoneNumberFetcher.java:136) at com.twilio.rest.lookups.v1.PhoneNumberFetcher.fetch(PhoneNumberFetcher.java:25) at com.twilio.base.Fetcher.fetch(Fetcher.java:45) at com.binaryfountain.compass.twilio.TwilioMessageCreator.main(TwilioMessageCreator.java:106)

Steps to Reproduce

Feature Request

If this is a feature request, make sure you search Issues for an existing
request before creating a new one!

@ugnich
Copy link

ugnich commented Sep 19, 2019

Same issue.

Phone number need to be URLEncode-d here:

"/v1/PhoneNumbers/" + this.pathPhoneNumber + "",

@childish-sambino childish-sambino added code-generation issue deals with generated code difficulty: easy fix is easy in difficulty type: bug bug in the library type: twilio enhancement feature request on Twilio's roadmap labels Sep 19, 2019
@childish-sambino
Copy link
Contributor

@ugnich Yup, this is near the top of our backlog. Pull requests and +1s on the issue summary will help it move up the backlog.

Similar issue fixed recently in Ruby: twilio/twilio-ruby#468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-generation issue deals with generated code difficulty: easy fix is easy in difficulty type: bug bug in the library type: twilio enhancement feature request on Twilio's roadmap
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants