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

CRITICAL: fix codegen internal URL #890

Merged
merged 2 commits into from
Oct 16, 2024
Merged
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
8 changes: 5 additions & 3 deletions servicex_app/servicex_app/code_gen_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ def __init__(self, code_gen_service_urls, transformer_manager):

@servicex_retry()
def post_request(self, post_url, post_obj):
result = requests.post(post_url + "/servicex/generated-code", json=post_obj,
timeout=REQUEST_TIMEOUT)
result = requests.post(post_url, json=post_obj, timeout=REQUEST_TIMEOUT)
return result

def generate_code_for_selection(
Expand Down Expand Up @@ -72,7 +71,10 @@ def generate_code_for_selection(
})

if result.status_code != 200:
msg = result.json()['Message']
try:
msg = result.json()['Message']
except KeyError:
msg = str(result.json())
raise ValueError(f'Failed to generate translation code: {msg}')

decoder_parts = decoder.MultipartDecoder.from_response(result)
Expand Down
Loading