Add support for handling ranch errors