File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -103,23 +103,28 @@ def get_normalized_input(name: str) -> str | None:
103
103
message = "Token request failed"
104
104
try :
105
105
error_payload = mint_token_resp .json ()
106
- reasons = "\n " .join (
107
- f"* `{ error ['code' ]} `: { error ['description' ]} "
108
- for error in error_payload ["errors" ]
109
- )
110
- message = f"""
111
- { message } : the server refused the request for the following reasons:
112
-
113
- { reasons }
114
- """
115
106
except requests .JSONDecodeError :
116
107
# Token exchange failure normally produces a JSON error response, but
117
108
# we might have hit a server error instead.
118
- message = f"""
119
- { message } : the index produced an unexpected { mint_token_resp .status_code } response.
109
+ message = dedent (
110
+ f"""
111
+ { message } : the index produced an unexpected { mint_token_resp .status_code } response.
120
112
121
- This strongly suggests a server configuration or downtime issue; wait
122
- a few minutes and try again.
113
+ This strongly suggests a server configuration or downtime issue; wait
114
+ a few minutes and try again.
115
+ """
116
+ )
117
+ die (message )
118
+
119
+ reasons = "\n " .join (
120
+ f"* `{ error ['code' ]} `: { error ['description' ]} "
121
+ for error in error_payload ["errors" ]
122
+ )
123
+
124
+ message = f"""
125
+ { message } : the server refused the request for the following reasons:
126
+
127
+ { reasons }
123
128
"""
124
129
125
130
die (message )
You can’t perform that action at this time.
0 commit comments