* Add conditional on error handling * Fix return type for handleError Co-authored-by: Omar López <zomars@me.com>