{"action":"created","issue":{"url":"https://api.github.com/repos/twilio/twilio-salesforce/issues/56","labels_url":"https://api.github.com/repos/twilio/twilio-salesforce/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/twilio/twilio-salesforce/issues/56/comments","events_url":"https://api.github.com/repos/twilio/twilio-salesforce/issues/56/events","html_url":"https://github.com/twilio/twilio-salesforce/issues/56","id":125790870,"number":56,"title":"TwilioRestException: Script-thrown exception","user":{"login":"cconroy222","id":10351374,"avatar_url":"https://avatars.githubusercontent.com/u/10351374?v=3","gravatar_id":"","url":"https://api.github.com/users/cconroy222","html_url":"https://github.com/cconroy222","followers_url":"https://api.github.com/users/cconroy222/followers","following_url":"https://api.github.com/users/cconroy222/following{/other_user}","gists_url":"https://api.github.com/users/cconroy222/gists{/gist_id}","starred_url":"https://api.github.com/users/cconroy222/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cconroy222/subscriptions","organizations_url":"https://api.github.com/users/cconroy222/orgs","repos_url":"https://api.github.com/users/cconroy222/repos","events_url":"https://api.github.com/users/cconroy222/events{/privacy}","received_events_url":"https://api.github.com/users/cconroy222/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-10T00:46:31Z","updated_at":"2016-01-18T22:42:32Z","closed_at":null,"body":"Installed the package into production and sandbox, tried migrating other code into production but had the following test failures: \r\n \r\nClass\t        Twilio_TestApplication\r\nMethod Name\ttestTwilioAplications_filter\r\nPass/Fail\t        Fail\r\nError Message\tTwilioRestException: Script-thrown exception\r\nStack Trace\tClass.TwilioRestClient: line 591, column 1\r\n                        Class.TwilioResource: line 82, column 1\r\n                        Class.TwilioResource.ListResource: line 463, column 1\r\n                        Class.TwilioApplicationList: line 80, column 1\r\n                        Class.Twilio_TestApplication.testTwilioAplications_filter: line 145, column 1\r\n\r\nClass\t        Twilio_TestApplication\r\nMethod Name\ttestTwilioAplications_get\r\nPass/Fail\t        Fail\r\nError Message\tTwilioRestException: Script-thrown exception\r\nStack Trace\tClass.TwilioRestClient: line 591, column 1\r\n                        Class.TwilioResource: line 82, column 1\r\n                        Class.TwilioResource.ListResource: line 463, column 1\r\n                        Class.TwilioApplicationList: line 80, column 1\r\n                        Class.Twilio_TestApplication.testTwilioAplications_get: line 66, column 1\r\n\r\nClass\t       Twilio_TestPhoneNumbers\r\nMethod Name\ttestTwilioAvailablePhoneNumbers_AreaCodeFilter\r\nPass/Fail\t        Fail\r\nError Message\tTwilioRestException: Script-thrown exception\r\nStack Trace\tClass.TwilioRestClient: line 591, column 1\r\n                        Class.TwilioResource: line 82, column 1\r\n                        Class.TwilioResource.ListResource: line 463, column 1\r\n                        Class.TwilioAvailablePhoneNumberList: line 106, column 1\r\n                        Class.Twilio_TestPhoneNumbers.testTwilioAvailablePhoneNumbers_AreaCodeFilter: line                      274, column 1"},"comment":{"url":"https://api.github.com/repos/twilio/twilio-salesforce/issues/comments/172673504","html_url":"https://github.com/twilio/twilio-salesforce/issues/56#issuecomment-172673504","issue_url":"https://api.github.com/repos/twilio/twilio-salesforce/issues/56","id":172673504,"user":{"login":"hhai","id":721000,"avatar_url":"https://avatars.githubusercontent.com/u/721000?v=3","gravatar_id":"","url":"https://api.github.com/users/hhai","html_url":"https://github.com/hhai","followers_url":"https://api.github.com/users/hhai/followers","following_url":"https://api.github.com/users/hhai/following{/other_user}","gists_url":"https://api.github.com/users/hhai/gists{/gist_id}","starred_url":"https://api.github.com/users/hhai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhai/subscriptions","organizations_url":"https://api.github.com/users/hhai/orgs","repos_url":"https://api.github.com/users/hhai/repos","events_url":"https://api.github.com/users/hhai/events{/privacy}","received_events_url":"https://api.github.com/users/hhai/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T22:42:32Z","updated_at":"2016-01-18T22:42:32Z","body":"From the debug log it still seems that it cannot match the URL strings\nproperly, and the parameters are still in the wrong order. Can you confirm\nthat you updated the params to look like this.\n\nmap<string,string> params=new map<string,string>();\n*params.put('VoiceMethod','POST');\nparams.put('FriendlyName','Testapp1');* // Get an API client and request\nthe Twilio Account TwilioRestClient client = new\nTwilioRestClient('AC03c2fcd60e144e7cbeee413fcbf812a3', authToken);\nTwilioApplicationList twapps = client.getAccount().getApplications(params);\n\n\n15:47:41.131 (1131101871)|USER_DEBUG|[73]|DEBUG|Resource Map:{\nHTTPS://API.TWILIO.COM/2010-04-01/ACCOUNTS/AC03C2FCD60E144E7CBEEE413FCBF812A3/APPLICATIONS.JSON?VOICEMETHOD=POST&FRIENDLYNAME=TESTAPP1=Response:[body={\"applications\":[{\"sid\":\"AP023e78c7f13a4fe683ef2e5ddc510399\",\"date_created\":\"Wed,\n01 Feb 2012 10:49:17 +0000\",\"date_updated\":\"Wed, 01 Feb 2012 10:49:17\n+0000\",\"account_sid\":\"AC03c2fcd60e144e7cbeee413fcbf812a3\",\"friendly_name\":\"Testapp1\",\"api_version\":\"2010-04-01\",\"voice_url\":null,\"voice_method\":\"POST\",\"voice_fallback_url\":null,\"voice_fallback_method\":\"POST\",\"status_callback\":null,\"status_callback_method\":\"POST\",\"voice_caller_id_lookup\":false,\"sms_url\":null,\"sms_method\":\"POST\",\"sms_fallback_url\":null,\"sms_fallback_method\":\"POST\",\"sms_status_callback\":null,\"uri\":\"/2010-04-01/Accounts/AC03c2fcd60e144e7cbeed179fcbf812a3/Applications/AP023e78c7f13a4fe683ef2e5ddc510399.json\"}],\"page\":0,\"num_pages\":1,\"page_size\":50,\"total\":1,\"start\":0,\"end\":0,\"uri\":\"/2010-04-01/Accounts/AC03c2fcd60e144e7cbeed179fcbf812a3/Applications.json?VoiceMethod=POST&FriendlyName=Testapp1\",\"first_page_uri\":\"/2010-04-01/Accounts/AC03c2fcd60e144e7cbeed179fcbf812a3/Applications.json?VoiceMethod=POST&FriendlyName=Testapp1&Page=0&PageSize=50\",\"previous_page_uri\":null,\"next_page_uri\":null,\"last_page_uri\":\"/2010-04-01/Accounts/AC03c2fcd60e144e7cbeed179fcbf812a3/Applications.json?VoiceMethod=POST&FriendlyName=Testapp1&Page=0&PageSize=50\"},\nheaders={Content-Type=application/json}, statusCode=200]} , Keys :{\nHTTPS://API.TWILIO.COM/2010-04-01/ACCOUNTS/AC03C2FCD60E144E7CBEEE413FCBF812A3/APPLICATIONS.JSON\n?*VOICEMETHOD=POST&**FRIENDLYNAME=TESTAPP1*}\n\n\n15:47:41.131 (1131115919)|STATEMENT_EXECUTE|[76]\n15:47:41.131 (1131118479)|STATEMENT_EXECUTE|[77]\n15:47:41.131 (1131122245)|HEAP_ALLOCATE|[77]|Bytes:61\n15:47:41.131 (1131129477)|HEAP_ALLOCATE|[77]|Bytes:199\n15:47:41.131 (1131149958)|USER_DEBUG|\n\n\n[77]|DEBUG|Twilio_TestHTTPMock::getResponse() Did not find Resource for GET\nhttps://api.twilio.com/2010-04-01/Accounts/AC03c2fcd60e144e7cbeee413fcbf812a3/Applications.json\n?*FriendlyName=Testapp1&VoiceMethod=POST*\n\n\n\nHenry Hai\n*twilio* cloud communications\nExpert Services\ne: hhai@twilio.com\nm: (718) 757-7157\n\n\nOn Mon, Jan 18, 2016 at 4:49 PM, cconroy222 <notifications@github.com>\nwrote:\n\n> Switched the order of the puts for the map and the same issue persists.\n>\n> Twilio_testApplication log.txt\n> <https://github.com/twilio/twilio-salesforce/files/95043/Twilio_testApplication.log.txt>\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/twilio/twilio-salesforce/issues/56#issuecomment-172663150>\n> .\n>\n"}}