use keys when assigning fields to AppError