Commit 4b90751
authored
fix(api/billing): stop falling back to ACUC when Autumn check fails (firecrawl#3631)
Autumn is the source of truth for credits and ACUC accounting has
diverged for many teams (e.g. teams showing negative remaining_credits
in ACUC while being current in Autumn). The previous code ran both
checks in parallel and silently fell back to ACUC whenever Autumn
returned null on error, producing spurious 402s.
The middleware now consults Autumn only and fails open on transient
Autumn failures, matching the behavior of browser.ts and
scrape-browser.ts.
Co-authored-by: firecrawl-spring[bot] <254786068+firecrawl-spring[bot]@users.noreply.github.com>1 parent 1cb9537 commit 4b90751
1 file changed
Lines changed: 19 additions & 25 deletions
File tree
- apps/api/src/routes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
120 | 119 | | |
121 | 120 | | |
122 | 121 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 122 | | |
146 | | - | |
147 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
148 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
149 | 143 | | |
150 | 144 | | |
151 | 145 | | |
| |||
0 commit comments