The error message I receive is, "Error: this message was not successfully delivered." This happens whenever texting my bank, or other business services that use short codes like this (e.g., 50292, or 22000) for customer interaction. I can receive their messages but I cannot send back any replies to them. They always fail with the same stated error message. I happen to be using a Sprint Samsung Galaxy S5 running on stock firmware. For SMS messaging I've preferred to use Google Voice (it's linked up to my Sprint number and handles my voice-mail too), but the error still happens on the stock SMS messaging app.
Ultimately, the solution was to decouple my Sprint number from the Google Voice service. The instructions to stop using the Sprint number are at https://support.google.com/voice/answer/1207070?co=GENIE.Platform%3DAndroid&hl=en. It says,
Stop using Google Voice on your Sprint phone
I use my Sprint number
Use a computer to remove the Sprint number from your account.
On your computer, open Google Voice. At the top left, click Menu Menu and then Legacy Google Voice. Google Voice will look different, but you're in the right place. At the top right, click Settings Settings and then Settings. Click the "Phones" tab. You'll see your Sprint mobile number with the note "Enabled by Sprint." Next to your Sprint mobile number, click Disable. After you turn off Google Voice, you'll have to record a new voicemail greeting for your Sprint phone service.
Now I am able to text those five digit and six digit phone numbers and get a reply back using my stock messaging app without an error!