change ctx.Error type from AppError to error