Commit e327ebe
committed
fix(quota): detect project from auth token and guard empty project ID
Application credentials are always scoped to a project, but the project
ID was never extracted from the auth token — the stub was left as a
TODO. This caused quota lookups to fail with a 403 because the API URL
contained an empty project ID (/os-quota-sets//detail).
Extract the project from the token via ExtractProject() so it is
pre-selected on startup, and add a guard in fetchQuotas() to return a
clear error instead of making a malformed API call.1 parent 445b795 commit e327ebe
2 files changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
1081 | 1082 | | |
1082 | 1083 | | |
1083 | 1084 | | |
1084 | | - | |
| 1085 | + | |
1085 | 1086 | | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
1089 | 1093 | | |
1090 | 1094 | | |
1091 | 1095 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| |||
0 commit comments