Use sparrow:shutdown/1 method for exiting error_handler with an error