Skip to content

Inform the user about invalid (expired) personal access token during data download #81

@Steffengreiner

Description

@Steffengreiner

Is your feature request related to a problem? Please describe.
If the user provides an invalid Personal Access Token (PAT) during data download via wget, the server will provide a non specific HTTP 403 response.

wget --content-disposition --trust-server-names --header "Authorization: Bearer <censored>" -i *_<input_measurements>.txt

Resolving <server>
Connecting to <server>:443... connected.
HTTP request sent, awaiting response... 403 
2025-12-16 14:07:15 ERROR 403: (no description).

Data Download via curl does not provide a direct response to the user, instead opting to only generate empty files in the download directory:

curl -OJ -H "Authorization: Bearer <censored>" https://<server>/measurements/<measurementId>

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

Describe the solution you'd like
Ideally, the user is informed that the download failed due to an invalid personal access token.
This could be done via a 401 HTTP error response providing additional information in the www-authenticate attribute about the access token expiration in its response header.

Additionally, add the -v flag to the curl command in the raw data download documentation to ensure the user at least is informed if an error occured during data download

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions