T.Akashi
T.Akashi

Reputation: 1221

Error handling for Quandl API

I'm using Quandl Ruby Client but sometimes it shows error that reason maybe when there is no code in Quandl.

Error message:

handle_api_error': (Status 404) (Quandl Error QECx02) You have submitted an incorrect Quandl code. Please check your Quandl codes and try again. (Quandl::NotFoundError)

My code:

data = Quandl::Dataset.get("TSE/7959").data( params: {limit:1})

I've already set api_key and api_version.

I read the library page but have no idea how to handle this error...

Does anyone have idea?

Thanks a lot!

Upvotes: 0

Views: 194

Answers (1)

T.Akashi
T.Akashi

Reputation: 1221

I reolved this issue ruby's error handling.

begin
  data = Quandl::Dataset.get("TSE/7959").data( params: {limit:1})
  return data
rescure => e
  p e
end

Thank you!

Upvotes: 0

Related Questions