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

Fix C# snippet to generate TaskRouter TaskQueue Capability Token #539

Merged

Conversation

shaileshn
Copy link
Contributor

The current C# sample for "Creating a TaskRouter TaskQueue capability token" has 2 errors.

  1. The channel parameter of TaskRouterCapability constructor should be passed the TaskQueue Sid rather than null. A value of null causes an Exception
    System.NullReferenceException occurred HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=<Cannot evaluate the exception source> StackTrace: at Twilio.Jwt.Taskrouter.TaskRouterCapability.get_Claims() at Twilio.Jwt.BaseJwt.ToJwt()

  2. There is a typo in the TaskQueue property of PolicyUrlUtils. The URL should have TaskQueues instead of TaskQueue

Fixing these 2 changes makes the sample work correctly. Current sample causes this issue

Copy link
Contributor

@po5i po5i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this!

@po5i po5i closed this Apr 27, 2018
@po5i po5i reopened this Apr 27, 2018
@po5i po5i merged commit 10f8b0e into TwilioDevEd:master Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants