b1conrad / b1conrad/pico-debug
access to pico-engine requiring basic authentication
- Dominant language
- KRL
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
The pico-debug CLI currently crashes when this is attempted
```
pico-engine is running at https://manifold.picolabs.io:9090
{ FetchError: invalid json response body at https://manifold.picolabs.io:9090/api/engine-version reason: Unexpected token < in JSON at position 0
at /Users/bconrad/sandbox/pico-debug/node_modules/node-fetch/lib/index.js:272:32
at process._tickCallback (internal/process/next_tick.js:68:7)
message:
'invalid json response body at https://manifold.picolabs.io:9090/api/engine-version reason: Unexpected token < in JSON at position 0',
type: 'invalid-json' }
```
We should detect this (probably a 403 response status) and prompt for the credentials, and then include them in this and all further requests with the proper HTTP header.
There is a workaround, which is to use a command argument like `https://USERNAME:PASSWORD@DOMAIN:PORT` with the disadvantage that the credentials will then show in the terminal for prying over-the-shoulder eyes or someone using `history` after the fact, etc.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.