We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3a595e commit f54f6dbCopy full SHA for f54f6db
1 file changed
layouts/partials/gordon-chat.html
@@ -79,7 +79,11 @@
79
} catch (err) {
80
// Only set error if messages weren't cleared
81
if (this.messages.length > 0) {
82
- this.error = 'Failed to get response. Please try again.'
+ if (err.message === 'RATE_LIMIT_EXCEEDED') {
83
+ this.error = 'You\'ve exceeded your question quota for the day. Please come back tomorrow.'
84
+ } else {
85
+ this.error = 'Failed to get response. Please try again.'
86
+ }
87
}
88
console.error('Gordon API error:', err)
89
// Only try to remove message if it still exists
@@ -160,6 +164,9 @@
160
164
})
161
165
162
166
if (!response.ok) {
167
+ if (response.status === 429) {
168
+ throw new Error('RATE_LIMIT_EXCEEDED')
169
163
170
throw new Error(`HTTP ${response.status}: ${response.statusText}`)
171
172
0 commit comments