porter-archive icon indicating copy to clipboard operation
porter-archive copied to clipboard

Fix To Error Messaging Around CLI & Auth (CloudFlare Zero Trust / Self Hosted)

Open craftyshaun opened this issue 3 years ago • 0 comments

Location

  • [ ] Browser
  • [X] CLI
  • [ ] API

Motivation

Pain point around error messaging for self-hosted using Cloudflare Zero Trust.

Requirements

Currently, when PORTER_CF_ACCESS_TOKEN is null or the token is invalid the CLI responds with the following error.

Error: invalid character '<' looking for beginning of value

Would be nice to:

  • catch this and display a different message relating to failed authentication.
  • bonus if the message could be parsed or the PORTER_HOST checked to see if its 'self hosted' to then hint towards docs

Additional Details

The following command could also be added to the docs. export PORTER_CF_ACCESS_TOKEN=$(cloudflared access token -app=https://porter.my-cloudflare-domain.com)

craftyshaun avatar May 18 '22 00:05 craftyshaun