FuelRats / pipsqueak

ED Fuel rats IRC bot
Other
13 stars 14 forks source link

Allow repeated calls to shorten to return the short url #215

Closed kaecyra closed 7 years ago

kaecyra commented 7 years ago

Currently, when a URL is shortened there is no way to re-shorten the same URL. The shortening service returns an error status, even though shortening was technically successful.

This change allows the error handling to spot this condition (error status, but shorturl still included) and avoids raising an exception. This allows the bot to return the original shorturl which is what the user wants.