amazon-braket-sdk-python icon indicating copy to clipboard operation
amazon-braket-sdk-python copied to clipboard

Feature Request: Better handling of invalid hybrid job names

Open dtrenev opened this issue 6 months ago • 1 comments

Requested Feature Validation of job name when creating a hybrid job.

Reason for Request This is a very low-effort code enhancement, that would substantially improve the user experience.

What problem does this solve? The issue is that when creating hybrid jobs, whose name includes an underscore (a fairly common naming practice for python users accustomed to a snake_case naming convention), the call will fail with a fairly non-descriptive error-message: botocore.exceptions.ClientError: An error occurred (BadRequestException) when calling the CreateJob operation: Invalid request body

This can send an unexperienced user on a wild goose chase (or, worse, discourage them from running the job altogether), when in reality all they need to fix their code is to change the name of the job.

dtrenev avatar Jun 20 '25 17:06 dtrenev

Hello I created a PR. Kindly have a look at it whenever you are free. Thanks a lot.

shalini9894 avatar Jun 24 '25 21:06 shalini9894

Hello @dtrenev @jacofeld have u had a chance to look at my PR? Do u suggest any changes? Thank you.

shalini9894 avatar Jun 28 '25 12:06 shalini9894

Might be more helpful to have a general ARN validator rather than one just for jobs; this can already be done with boto, but perhaps there's a reason to have it built into the Braket SDK?

speller26 avatar Aug 21 '25 18:08 speller26