mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-27 20:16:22 +02:00
#1194 respond to rejected orders
This commit is contained in:
@@ -183,6 +183,8 @@ def apiPlaceOrderNew(session, shopurl, hostid, toraddressWithPort):
|
||||
response = session.post(url, data=postData)
|
||||
except Exception as e:
|
||||
raise BlitzError("failed HTTP request",url,e)
|
||||
if response.status_code == 420:
|
||||
raise BlitzError("forwarding this address was rejected",response.status_code)
|
||||
if response.status_code != 201:
|
||||
raise BlitzError("failed HTTP code",response.status_code)
|
||||
|
||||
@@ -206,6 +208,8 @@ def apiPlaceOrderExtension(session, shopurl, bridgeid):
|
||||
response = session.post(url)
|
||||
except Exception as e:
|
||||
raise BlitzError("failed HTTP request",url,e)
|
||||
if response.status_code == 420:
|
||||
raise BlitzError("forwarding this address was rejected",response.status_code)
|
||||
if response.status_code != 200 and response.status_code != 201:
|
||||
raise BlitzError("failed HTTP code",response.status_code)
|
||||
|
||||
|
Reference in New Issue
Block a user