add Session#api_error to errors object