-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Description:
It appears that when using the client.update_dataset_metadata(request)
method to update the dataset metadata, it will return the following error if the dataset already has metadata:
invariant_sdk.types.exceptions.InvariantError: Error calling method: PUT for path: /api/v1/dataset/metadata/your_dataset_name
Reproduction of the issue:
After successfully pushing traces to explorer using client.push_trace(request)
and client.update_dataset_metadata(request)
, repeating the second command will trigger the above error.
Suggestion:
- It would be helpful to have a specific error message just like those for error code 500, 401, 404:
invariant-sdk/python/invariant_sdk/client.py
Lines 149 to 157 in 50c0ade
if response.status_code == 500: raise InvariantAPIError( f"Server error caused failure when calling method: {method} for path: {pathname}." ) from e if response.status_code == 401: raise InvariantAuthError( f"Authentication failed when calling method: {method} for path: {pathname}." ) from e if response.status_code == 404: - Add a feature to overwrite the old metadata for update (such as a
force=true
parameter) or add a feature to delete the old metadata (supporting aDELETE
request only targeting metadata) without needing to delete the whole dataset.
Metadata
Metadata
Assignees
Labels
No labels