-
Notifications
You must be signed in to change notification settings - Fork 136
TwilioRestException: Script-thrown exception #56
Comments
Can you send along the Debug Log when you execute the tests? Thanks, Henry Hai On Sat, Jan 9, 2016 at 7:46 PM, cconroy222 [email protected] wrote:
|
This was a salesforce enhancement "*Predictable Iteration Order for that caused issues with the test classes and the order of the URL Expected Order from the test request. TestPhoneNumber Expected Order form the test request. You could either update the URL parameters to match the MAP or vice versa. |
Switched the order of the puts for the map and the same issue persists. |
Also tried changing the order of the URL params and that didn't fix anything either. |
From the debug log it still seems that it cannot match the URL strings map<string,string> params=new map<string,string>(); 15:47:41.131 (1131101871)|USER_DEBUG|[73]|DEBUG|Resource Map:{ 15:47:41.131 (1131115919)|STATEMENT_EXECUTE|[76] [77]|DEBUG|Twilio_TestHTTPMock::getResponse() Did not find Resource for GET Henry Hai On Mon, Jan 18, 2016 at 4:49 PM, cconroy222 [email protected]
|
Yeah, I've attached my test class as well as the debug log. Should I be updating it somewhere outside of this class? |
The test class you have attached is missing the parameters that should Twilio_TestHTTPMock.getInstance().putResponse( There should be "?VoiceMethod=POST&FriendlyName=Testapp1" in the URL map<String,String> params=new map<String,String>(); On Mon, Jan 18, 2016 at 9:08 PM, cconroy222 [email protected]
|
That did it! Thanks for your help. |
Why don't you guys fix the unit tests in the install?! |
Guys I have just fixed this #64 |
Installed the package into production and sandbox, tried migrating other code into production but had the following test failures:
Class Twilio_TestApplication
Method Name testTwilioAplications_filter
Pass/Fail Fail
Error Message TwilioRestException: Script-thrown exception
Stack Trace Class.TwilioRestClient: line 591, column 1
Class.TwilioResource: line 82, column 1
Class.TwilioResource.ListResource: line 463, column 1
Class.TwilioApplicationList: line 80, column 1
Class.Twilio_TestApplication.testTwilioAplications_filter: line 145, column 1
Class Twilio_TestApplication
Method Name testTwilioAplications_get
Pass/Fail Fail
Error Message TwilioRestException: Script-thrown exception
Stack Trace Class.TwilioRestClient: line 591, column 1
Class.TwilioResource: line 82, column 1
Class.TwilioResource.ListResource: line 463, column 1
Class.TwilioApplicationList: line 80, column 1
Class.Twilio_TestApplication.testTwilioAplications_get: line 66, column 1
Class Twilio_TestPhoneNumbers
Method Name testTwilioAvailablePhoneNumbers_AreaCodeFilter
Pass/Fail Fail
Error Message TwilioRestException: Script-thrown exception
Stack Trace Class.TwilioRestClient: line 591, column 1
Class.TwilioResource: line 82, column 1
Class.TwilioResource.ListResource: line 463, column 1
Class.TwilioAvailablePhoneNumberList: line 106, column 1
Class.Twilio_TestPhoneNumbers.testTwilioAvailablePhoneNumbers_AreaCodeFilter: line 274, column 1
The text was updated successfully, but these errors were encountered: