@@ -194,7 +194,7 @@ describe("webviewMessageHandler - getCloudAgents", () => {
194194 } )
195195 } )
196196
197- it ( "should handle authentication errors and show user message " , async ( ) => {
197+ it ( "should handle authentication errors silently " , async ( ) => {
198198 const authError = new AuthenticationError ( "Authentication required" )
199199
200200 const mockCloudAPI = {
@@ -214,7 +214,8 @@ describe("webviewMessageHandler - getCloudAgents", () => {
214214 agents : [ ] ,
215215 error : "Authentication required" ,
216216 } )
217- expect ( vscode . window . showErrorMessage ) . toHaveBeenCalledWith ( "common:errors.auth_required_for_cloud_agents" )
217+ // Should NOT show error message - handled silently
218+ expect ( vscode . window . showErrorMessage ) . not . toHaveBeenCalled ( )
218219 } )
219220
220221 it ( "should handle general errors without showing auth message" , async ( ) => {
@@ -241,7 +242,7 @@ describe("webviewMessageHandler - getCloudAgents", () => {
241242 expect ( vscode . window . showErrorMessage ) . not . toHaveBeenCalled ( )
242243 } )
243244
244- it ( "should detect 401 errors in error message " , async ( ) => {
245+ it ( "should handle 401 errors silently " , async ( ) => {
245246 const error401 = new Error ( "HTTP 401: Unauthorized" )
246247
247248 const mockCloudAPI = {
@@ -260,7 +261,7 @@ describe("webviewMessageHandler - getCloudAgents", () => {
260261 agents : [ ] ,
261262 error : "HTTP 401: Unauthorized" ,
262263 } )
263- // Should show auth error message for 401 errors
264- expect ( vscode . window . showErrorMessage ) . toHaveBeenCalledWith ( "common:errors.auth_required_for_cloud_agents" )
264+ // Should NOT show error message - handled silently
265+ expect ( vscode . window . showErrorMessage ) . not . toHaveBeenCalled ( )
265266 } )
266267} )
0 commit comments