Ruby for All cover image

Favorite Ruby Methods: Part 3 - Strings

Ruby for All

CHAPTER

How to Fix an Invalid Encoding Error in Honey Badger

When you get an error like this, what do you do next? You have to make a decision in your business logic basically. If it's sent in from an API, which I think is what the case was when I ran into it, then you're just going to have to return an error or just stop because you don't want your program to error out later due to poorly encoded string. We were getting errors in our error monitoring in Honey Badger. So that's valid encoding. All right, moving on to sub. Sub returns a copy of itself with only the first occurrence, not all occurrences of the given pattern replaced. G sub is the next one on our list. And

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner