rename "error" function to "catchError"