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

[Tables] Invalid table name error doesn't indicate the issue #12541

Closed
seankane-msft opened this issue Jul 14, 2020 · 1 comment
Closed

[Tables] Invalid table name error doesn't indicate the issue #12541

seankane-msft opened this issue Jul 14, 2020 · 1 comment
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Tables

Comments

@seankane-msft
Copy link
Member

When a user attempts to create a table with an invalid name (table names must be alphanumeric) the error thrown does not give information as to what the user is doing wrong.

Traceback (most recent call last):
  File "create_table.py", line 19, in <module>
    table = service.create_table(table_name="test_table")
  File "C:\Users\Sean Kane\Documents\azure\azure-sdk-for-python\envs\py_38\lib\site-packages\azure\core\tracing\decorator.py", line 83, in wrapper_use_tracer
    return func(*args, **kwargs)
  File "c:\users\sean kane\documents\azure\azure-sdk-for-python\sdk\table\azure-table\azure\table\_table_service_client.py", line 189, in create_table     
    self._client.table.create(table_properties)
  File "c:\users\sean kane\documents\azure\azure-sdk-for-python\sdk\table\azure-table\azure\table\_generated\operations\_table_operations.py", line 204, in create
    raise HttpResponseError(response=response, model=error)
azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Bad Request'
@seankane-msft seankane-msft added Client This issue points to a problem in the data-plane of the library. Tables labels Jul 14, 2020
@seankane-msft seankane-msft self-assigned this Jul 14, 2020
@annatisch
Copy link
Member

Thanks @seankane-msft - good catch - that is definitely an unfortunate error....
@LibbaLawrence - we may need to do some kind of regex on the table name before calling create.

This is what we were discussing this morning when I mentioned removing client-side validation to see how the service responds. In this case the service is raising a particularly unhelpful error - so client-side validation is probably a good idea.

openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Feb 4, 2021
Swagger correctness issue fix(Additional Property not allowed) (Azure#12541)

* Swagger correctness issue fix(Additional Property not allowed)

* Added custom-word

* Removing unused properrty

* Ignored Tera

* Reverting not related changes
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Tables
Projects
None yet
Development

No branches or pull requests

2 participants