File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true 
22
3+ require ( "ibm_cloud_sdk_core" ) 
4+ 
35# Module for the Watson APIs 
46module  IBMWatson 
7+   ApiException  =  IBMCloudSdkCore ::ApiException 
8+   DetailedResponse  =  IBMCloudSdkCore ::DetailedResponse 
9+   IAMTokenManager  =  IBMCloudSdkCore ::IAMTokenManager 
10+ 
511  require_relative ( "./ibm_watson/personality_insights_v3.rb" ) 
612  require_relative ( "./ibm_watson/tone_analyzer_v3.rb" ) 
713  require_relative ( "./ibm_watson/assistant_v1.rb" ) 
Original file line number Diff line number Diff line change @@ -706,7 +706,7 @@ def test_receive_error
706706      begin 
707707        service . iam_apikey ( iam_apikey : "bogus_api_key" ) 
708708        service . list_workspaces 
709-       rescue  IBMCloudSdkCore ::ApiException  =>  e 
709+       rescue  IBMWatson ::ApiException  =>  e 
710710        assert_equal ( "Provided API key could not be found" ,  e . info [ "errorMessage" ] ) 
711711        error_received  =  true 
712712      end 
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ def test_rate_limit_exceeded
101101        workspace_id : "boguswid" , 
102102        text : "I want financial advice today." 
103103      ) 
104-     rescue  IBMCloudSdkCore ::ApiException  =>  e 
104+     rescue  IBMWatson ::ApiException  =>  e 
105105      assert_equal ( error_code ,  e . code ) 
106106      assert_equal ( error_msg ,  e . error ) 
107107      assert ( e . to_s . instance_of? ( String ) ) 
@@ -138,7 +138,7 @@ def test_unknown_error
138138        workspace_id : "boguswid" , 
139139        text : "I want financial advice today." 
140140      ) 
141-     rescue  IBMCloudSdkCore ::ApiException  =>  e 
141+     rescue  IBMWatson ::ApiException  =>  e 
142142      assert_equal ( error_code ,  e . code ) 
143143      assert_equal ( error_msg ,  e . error ) 
144144    end 
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ def test_error
135135    ) 
136136    begin 
137137      service . tone ( tone_input : text ,  content_type : "application/json" ) 
138-     rescue  IBMCloudSdkCore ::ApiException  =>  e 
138+     rescue  IBMWatson ::ApiException  =>  e 
139139      assert_equal ( error_code ,  e . code ) 
140140      assert_equal ( error_message ,  e . error ) 
141141      assert_equal ( "C00012" ,  e . info [ "sub_code" ] ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments