FlowFuse / FlowFuse/flowfuse

Error handling on the /acount/verify/token path doesn't provide useful failure information

Open
#3,546 0 comments 0 reactions 0 assignees View on GitHub
needs-triage type:bug
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 21h
Merged PRs (30d)
146

Description

### Current Behavior

If the platform fails to create an instance as part of verifying a new users email the error messages just say "Error"

```
2024-03-05 08:14:12
{"level":"INFO","time":"2024-03-05T08:14:12.877Z","reqId":"req-bpw","res":{"statusCode":400,"request":{"url":"/account/verify/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJmZi10ZXN0LXVzZXItMkBtYWlsaW5hdG9yLmNvbSIsImV4cCI6MTcwOTc5OTI0MiwiaWF0IjoxNzA5NjI2NDQyfQ.VC4SJcD4ko4hx0EDqRi0IE2-vS8z6tFOhMv-GF-yTyI","method":"POST","remoteAddress":"95.90.236.27","remotePort":54318}},"responseTime":729.779100894928,"msg":"request completed"}Show context
2024-03-05 08:14:12
{"level":"ERROR","time":"2024-03-05T08:14:12.876Z","msg":"AUDIT: event: account.verify.verify-token, type: user, Error"}
2024-03-05 08:14:12
{"level":"ERROR","time":"2024-03-05T08:14:12.873Z","msg":"/account/verify/token error - Error"}
2024-03-05 08:14:12
{"level":"INFO","time":"2024-03-05T08:14:12.637Z","msg":"AUDIT: event: account.verify.auto-create-team, type: user, id: 90"}
2024-03-05 08:14:12
{"level":"INFO","time":"2024-03-05T08:14:12.473Z","msg":"AUDIT: event: account.verify.verify-token, type: user, id: 90"}
2024-03-05 08:14:12
{"level":"INFO","time":"2024-03-05T08:14:12.392Z","msg":"AUDIT: event: account.verify.auto-create-team, type: user, id: 90"}
2024-03-05 08:14:12
{"level":"INFO","time":"2024-03-05T08:14:12.147Z","reqId":"req-bpw","req":{"method":"POST","url":"/account/verify/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJmZi10ZXN0LXVzZXItMkBtYWlsaW5hdG9yLmNvbSIsImV4cCI6MTcwOTc5OTI0MiwiaWF0IjoxNzA5NjI2NDQyfQ.VC4SJcD4ko4hx0EDqRi0IE2-vS8z6tFOhMv-GF-yTyI","hostname":"forge.flowfuse.dev","remoteAddress":"95.90.236.27","remotePort":54318},"msg":"incoming request"}
```

### Expected Behavior

```
{"level":"ERROR","time":"2024-03-05T08:14:12.873Z","msg":"/account/verify/token error - Error"}
```

Should say more than just `Error`

### Steps To Reproduce

Remove tail period from Starter team on staging so instance creation fails due to billing not setup.

Create a new user.

### Environment

- FlowFuse version: 2.1.1
- Node.js version: 18.x
- npm version: 9.x
- Platform/OS: all
- Browser: NA

### Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.