Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

working #39

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1.7.0
1.7.1

Live-docs: https://tapis-project.github.io/live-docs/?service=GlobusProxy

Expand All @@ -9,9 +9,4 @@ New features:
- none

Bug fixes:
- fixed incorrect error code when globus errors happen while making a transfer
- fixed formatting of error logs
- fixed 400 error on GET when a content-type header is included
- added additional tenant
- better error messages for uncaught exceptions
- change schema to allow for larger file sizes
- fixed incorrect error code when performing operations on an endpoint/collection that has been deleted
7 changes: 6 additions & 1 deletion service/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ def handle_transfer_error(exception, endpoint_id=None, msg=None):
error = GlobusInvalidRequestError(msg=message)
if exception.code == 404:
error = EndpointNotFoundError(msg=exception.message)
if exception.code == 'EndpointDeleted':
error = EndpointNotFoundError(msg=exception.message)
logger.error(error)
return error

Expand Down Expand Up @@ -331,7 +333,10 @@ def precheck(client_id, endpoints, access_token, refresh_token):
endpoints = list(endpoints.split())
logger.debug(f'have ep list:: {endpoints}')
for endpoint_id in endpoints:
endpoint_info = transfer_client.get_endpoint(endpoint_id)
try:
endpoint_info = transfer_client.get_endpoint(endpoint_id)
except TransferAPIError as e:
raise handle_transfer_error(e)
endpoint_type = endpoint_info["entity_type"]
if endpoint_type == "GCP_mapped_collection": # if it's a globus connect personal ep
connected = is_endpoint_connected(transfer_client, endpoint_id)
Expand Down
Loading