Skip to content

Exception type not properly displayed when STAC search encounters error #5

Description

@DakotaHester

See below:

/Users/dak/projects/pcxarray/src/pcxarray/query.py:143: UserWarning: STAC search failed: <slot wrapper '__str__' of 'BaseException' objects>: <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' '[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>](http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'%3E)
<html xmlns='[http://www.w3.org/1999/xhtml'>](http://www.w3.org/1999/xhtml'%3E)

<head>
    <meta content='text/html; charset=utf-8' http-equiv='content-type' [/](https://file+.vscode-resource.vscode-cdn.net/)>
    <style type='text/css'>
        body {
            font-family: Arial;
            margin-left: 40px;
        }

        img {
            border: 0 none;
        }

        #content {
            margin-left: auto;
            margin-right: auto
        }

        #message h1 {
            font-size: 24px;
            font-weight: normal;
            color: #000000;
            margin: 34px 0px 0px 0px
        }

        #message h2 {
            font-size: 20px;
            font-weight: normal;
            color: #000000;
            margin: 34px 0px 0px 0px
        }

        #message p {
            font-size: 16px;
            color: #000000;
            margin: 8px 0px 0px 0px
        }

        #message hr {
            margin: 15px 0px
        }

        #errorref {
            font-size: 11px;
            color: #737373;
            margin-top: 41px
        }
    <[/](https://file+.vscode-resource.vscode-cdn.net/)style>
    <title>Service unavailable</title>
</head>

<body>
    <div id='content'>
        <div id='message'>
            <h1>502</h1>
<h2><span>The service behind this page isn't responding to Azure Front Door.<[/](https://file+.vscode-resource.vscode-cdn.net/)span>
</h2>
<hr />
<p>Bad Gateway</p>
<p>Azure Front Door wasn't able to connect to the origin. <br> If the problem persists, use the troubleshooting steps to resolve the issue.</p>
<br />
<a href="https://learn.microsoft.com/en-us/azure/frontdoor/troubleshoot-issues" target="blank">Azure Documentation</a>
<br [/](https://file+.vscode-resource.vscode-cdn.net/)>
        </div>
        <div id='errorref'>
            <span>Error Info:</span><span>OriginConnectionAborted<[/](https://file+.vscode-resource.vscode-cdn.net/)span><br />
<span>x-azure-ref ID:</span><span>20250813T071506Z-175cf55dfd48tvdnhC1SN1gpsc0000000dh0000000001n9a            </span>
        </div>
    </div>
</body>
</html>
. Retrying (1/5)...
  warn(f"STAC search failed: {type(e).__str__}: {e}. Retrying ({retries + 1}/{max_retries})...")

type(e).__str__ needs to actually call __str__ method.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions