We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 388a551 commit 7d11912Copy full SHA for 7d11912
1 file changed
lua/CopilotChat/client.lua
@@ -252,7 +252,13 @@ function Client:models()
252
253
local ok, headers = pcall(self.authenticate, self, provider_name)
254
if not ok then
255
- log.warn('Failed to authenticate with ' .. provider_name .. ': ' .. headers)
+ log.error('Failed to authenticate with ' .. provider_name .. ': ' .. headers)
256
+ local user_err_msg = 'Failed to authenticate with ' .. provider_name
257
+ -- append error details, if available
258
+ if headers.error_details and headers.error_details.message then
259
+ user_err_msg = user_err_msg .. ' the server replied : ' .. headers.error_details.message
260
+ end
261
+ error(user_err_msg)
262
return {}
263
end
264
0 commit comments