question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot Import ServiceUnavailableException

See original GitHub issue

Hello,

I’m trying to use boto3 to work with AWS firehose. As per the boto3 docs on the AWS firehose method put_record(), my code should be prepared to catch ServiceUnavailableException:

If the PutRecord operation throws a ServiceUnavailableException , back off and retry. If the exception persists, it is possible that the throughput limits have been exceeded for the delivery stream.

I cannot find where ServiceUnavialableException is defined. It certainly is not in boto3 or botocore

In [31]: from boto3.exceptions import ServiceUnavailableException
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-31-d0ffff8323fb> in <module>()
----> 1 from boto3.exceptions import ServiceUnavailableException

ImportError: cannot import name ServiceUnavailableException

In [32]: from botocore.exceptions import ServiceUnavailableException
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-32-47b3b14f7ff7> in <module>()
----> 1 from botocore.exceptions import ServiceUnavailableException

ImportError: cannot import name ServiceUnavailableException

A ServiceUnavialableException does appear to de defined in boto though (from boto.logs.exceptions import ServiceUnavailableException). Surely boto's version of the exception is not what I’m expected to use?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
kyleknapcommented, Mar 2, 2016

Yes we will retry automatically if we start getting 503’s. I also do not think that the upstream source should have that in the documentation. I will look into getting that updated. And that is pretty much the logic for how long backoff will take as implemented here

0reactions
yotamsscommented, Mar 22, 2022

Also got confused by the docs, any plans to add that to the docs?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ServiceUnavailableException ocurs when using HTTP binding ...
The HTTP import binding cannot connect to the HTTPS service through the HTTP proxy and receives a ServiceUnavailableException.
Read more >
How to catch `botocore.errorfactory.UserNotFoundException`?
When an exception is created by botocore.error_factory then it is not possible to directly import it. Instead of direct import, ...
Read more >
ServiceUnavailableException (AWS SDK for Java - 1.12.363)
The service cannot complete the request. See Also: Serialized Form ... Constructs a new ServiceUnavailableException with the specified error message.
Read more >
500 error when accessing issues - org.eclipse.gemini ... - Jira
Issues can't be accessed. ... ServiceUnavailableException: service matching ... at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.
Read more >
JDK-6955783 ServiceUnavailableException caught ... - Bug ID
JDK-6955783 : ServiceUnavailableException caught even the secondary DNS is ... 20 mx3.sun.com Here is sample code and reproducible steps. import java.util.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found