Skip to content

Conversation

@ash-jc-allen
Copy link
Contributor

@ash-jc-allen ash-jc-allen commented Dec 15, 2022

Description

Hey! This PR is only a small one and just adds : between the title and body that are concatenated in the exception messages in the Vonage\Messages\ExceptionErrorHandler.

I'm really new to working with this package, so I apologise if I've not done this right, or if it's not needed!

Motivation and Context

When I was working with the Laravel Vonage package trying to send a message, an exception was thrown because I'd passed an incorrect parameter. The exception's message read:

Invalid senderThe `from` parameter is invalid.

So I've copied the same approach that's been used on line 41 in that class and added the separator between the response body's title and body. This would change the above message to:

Invalid sender: The `from` parameter is invalid.

How Has This Been Tested?

I've tested these changes by trying to send a WhatsApp message with some invalid parameters.

Example Output or Screenshots (if appropriate):

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@ash-jc-allen ash-jc-allen marked this pull request as ready for review December 15, 2022 23:23
@SecondeJK
Copy link
Contributor

This is a nice UX change, thanks!

@SecondeJK SecondeJK merged commit 03ea7cd into Vonage:main Jan 4, 2023
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.

2 participants