Hello,
I noticed some strange behavior with the client sdk.
I am configuring the client as:
def client
@_client ||= LookerSDK::Client.new(
client_id: Settings.looker.client_id,
client_secret: Settings.looker.client_secret,
api_endpoint: Settings.looker.api_endpoint,
connection_options: {
request: {
timeout: 360,
open_timeout: 30,
},
},
)
end
when using the client, I sometimes get
NoMethodError: undefined method run_inline_query' for #<LookerSDK::Client:0x0000000130cbd0> from looker-sdk/client/dynamic.rb:62:in method_missing'
I have not been able to find a better stack trace for this (even adding breakpoints in your client was not enough to figure this out). I was able to narrow down the failure to this test case:
it "throws an error" do
stub_request(:post, /caring.looker.com:19999\/login/).to_return(status: [500, "Internal Server Error"])
stub_request(:get, /caring.looker.com:19999\/api\/3.0\/swagger.json/).to_return(status: [500, "Internal Server Error"])
expect {
client.run_inline_query('json', {})
}.to raise_exception(NoMethodError)
end
How should I handle this? My understanding is that a 500 during the login or when fetching swagger.json would make @swagger be nil, propping find_entry(method_name) in dynamic.rb return false. The 500 during either the login or fetching the config json is something to be expected, but I would expect a LookerSDK::ServerError instead of a NoMethodError
Hello,
I noticed some strange behavior with the client sdk.
I am configuring the client as:
when using the client, I sometimes get
NoMethodError: undefined method
run_inline_query' for #<LookerSDK::Client:0x0000000130cbd0> from looker-sdk/client/dynamic.rb:62:inmethod_missing'I have not been able to find a better stack trace for this (even adding breakpoints in your client was not enough to figure this out). I was able to narrow down the failure to this test case:
How should I handle this? My understanding is that a 500 during the login or when fetching swagger.json would make
@swaggerbe nil, proppingfind_entry(method_name)in dynamic.rb return false. The 500 during either the login or fetching the config json is something to be expected, but I would expect a LookerSDK::ServerError instead of a NoMethodError