From 98a4cd380cb2a31ea637d60eaa723b17fc7a64e8 Mon Sep 17 00:00:00 2001 From: andig Date: Wed, 3 Jun 2026 09:14:45 +0200 Subject: [PATCH] Add EU Data Act subscription not configured error --- vehicle/vw/eudataact/api.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vehicle/vw/eudataact/api.go b/vehicle/vw/eudataact/api.go index a7934edcd..9bd799ff7 100644 --- a/vehicle/vw/eudataact/api.go +++ b/vehicle/vw/eudataact/api.go @@ -33,6 +33,8 @@ const ( var portalHost = strings.TrimPrefix(BaseURL, "https://") +var ErrNotConfigured = errors.New("EU Data Act subscription not configured") + // API is the EU Data Act portal client. It authenticates through the VW group // identity service and reads vehicle data from the portal's data delivery API. // @@ -274,6 +276,9 @@ func (v *API) identifier(vin string) (string, error) { Identifier string `json:"Identifier"` } if err := v.getJSON(uri, &res); err != nil { + if se, ok := errors.AsType[*request.StatusError](err); ok && se.HasStatus(404) { + err = ErrNotConfigured + } return "", err }