public function resourceCannotBeDeleted(string $detail = null): ErrorInterface
    {
        return new Error(
            null,
            null,
            Response::HTTP_UNPROCESSABLE_ENTITY,
            $this->trans('resource_cannot_be_deleted', 'code'),
            $this->trans('resource_cannot_be_deleted', 'title'),
            $detail ?: $this->trans('resource_cannot_be_deleted', 'detail')
        );
    }