Skip to content

Commit

Permalink
fix: return 400 error when requesting a non valid table
Browse files Browse the repository at this point in the history
  • Loading branch information
dlbrittain committed Aug 8, 2022
1 parent eb70748 commit 81c347a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions materializationengine/blueprints/client/datastack.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@ def wrapper(*args, **kwargs):
# check if target table is valid
valid_tables = [r.table_name for r in response]
if target_table not in valid_tables:
raise ValueError(
f"{target_table} not valid for version {target_version}"
)
return f"{target_table} not valid for version {target_version}", 400

# remap datastack name to point to parent version
if kwargs.get("datastack_name"):
kwargs["datastack_name"] = parent_datastack
Expand Down

0 comments on commit 81c347a

Please sign in to comment.