[x] Updated the CHANGELOG.md to reflect any feature, bug fixes, or known issues made in the source code
[x] Tested code changes and observed expected behavior in the example app
[x] Performed a visual inspection of the Files changed tab prior to submitting the pull request for review to ensure proper usage of the style guide
All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.
[x] I acknowledge that all my contributions will be made under the project's license.
Description
This PR updates the @twilio/voice-errors package to 1.6.0. It also adds relevant CallMessage errors to the generated errors: 31210 and 31211.
Breakdown
Update error package.
Add error generation unit tests.
Refactor error generation to be conducive of unit testing.
Validation
New unit tests.
For the CallMessage error codes, manual testing and reproduction of those errors.
Scenarios:
const validMessage = new CallMessage({
content: 'some string',
contentType: 'application/json',
messageType: 'user-defined-message',
});
const largeMessage = new CallMessage({
content: MESSAGE_CONTENT_EXCEEDING_MAX_PAYLOAD_SIZE,
// this is a 10k+ length string
contentType: 'application/json',
messageType: 'user-defined-message',
});
const invalidContentTypeMessage = new CallMessage({
content: { foo: 'bar' },
contentType: 'not a real content type foobar',
messageType: 'user-defined-message',
});
const invalidMessageTypeMessage = new CallMessage({
content: { foo: 'bar' },
contentType: 'application/json',
messageType: 'not a real message type foobar',
});
Results:
Scenario
iOS
Android
Valid Message
Success, no error
Success, no error
Large Message
Fail, neither error callback or success callback fired
Submission Checklist
CHANGELOG.md
to reflect any feature, bug fixes, or known issues made in the source codeFiles changed
tab prior to submitting the pull request for review to ensure proper usage of the style guideDescription
This PR updates the
@twilio/voice-errors
package to1.6.0
. It also adds relevantCallMessage
errors to the generated errors:31210
and31211
.Breakdown
Validation
Scenarios:
Results:
Additional Notes
N/A