Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NonExistentQueue could show the queue name #1352

Closed
phstc opened this issue Dec 3, 2016 · 4 comments
Closed

NonExistentQueue could show the queue name #1352

phstc opened this issue Dec 3, 2016 · 4 comments
Labels
feature-request A feature should be added or improved. service-api General API label for AWS Services.

Comments

@phstc
Copy link

phstc commented Dec 3, 2016

When trying to lookup for a non existent queue, the SDK raises a generic message, which does not show the queue name, and depending on the setup, it isn't straighforward to find which queue is not found. For example: shoryuken tries to load all queues specified in the shoryuken.yml, and raising a generic error message, would require to investigate queue by queue to find which one is not found.

Currently, shoryuken rescues NonExistentQueue to give a specific message, but it would be great to have it in the SDK instead.

client.get_queue_url(queue_name: 'super_queue').queue_url

Aws::SQS::Errors::NonExistentQueue: The specified queue does not exist for this wsdl version.
@pchaganti
Copy link

👍

@trevorrowe
Copy link
Member

The error message is written by the service, and is simply returned and raised by the SDK. That said, the error object should respond to the method #context. The context object contains the request parameters.

begin
  client.get_queue_url(queue_name: 'q-name')
rescue Aws::SQS::Errors::NonExistentQueue => error
  puts "Queue #{error.context.params[:queue_name]} not found"
end

@phstc
Copy link
Author

phstc commented Dec 4, 2016

@trevorrowe I understand that, but I was wondering if the sdk could abstract that and raise up a more explicit message, so the clients don't need to rescue, in order to raise a more descriptive error message.

@awood45 awood45 added feature-request A feature should be added or improved. service-api General API label for AWS Services. Version 2 labels Dec 9, 2016
@awood45
Copy link
Member

awood45 commented Jan 6, 2017

Added to feature request backlog.

@awood45 awood45 closed this as completed Jan 6, 2017
awood45 added a commit that referenced this issue Jan 6, 2017
awood45 added a commit that referenced this issue Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. service-api General API label for AWS Services.
Projects
None yet
Development

No branches or pull requests

4 participants