quick commit

This commit is contained in:
2024-09-18 14:46:53 +03:00
parent 39035caf13
commit 88a18758da
3 changed files with 86 additions and 5 deletions

View File

@@ -14,7 +14,13 @@ def query(ra, dec, radius):
'radius' : radius
}
response = requests.get(url, params=params)
response.raise_for_status
data = response.json()
return data
try:
response.raise_for_status() # Ensure this is a method call
print(response.text) # Print the raw response text
return response.text # Return the raw response text
except requests.exceptions.HTTPError as http_err:
print(f"HTTP error occurred: {http_err}")
return None
except requests.exceptions.RequestException as req_err:
print(f"Request error occurred: {req_err}")
return None