diff --git a/bigframes/operations/json_ops.py b/bigframes/operations/json_ops.py index 1daacf4e6b..c9ce633cae 100644 --- a/bigframes/operations/json_ops.py +++ b/bigframes/operations/json_ops.py @@ -31,7 +31,7 @@ def output_type(self, *input_types): input_type = input_types[0] if not dtypes.is_json_like(input_type): raise TypeError( - "Input type must be an valid JSON object or JSON-formatted string type." + "Input type must be a valid JSON object or JSON-formatted string type." + f" Received type: {input_type}" ) return input_type @@ -46,7 +46,7 @@ def output_type(self, *input_types): input_type = input_types[0] if not dtypes.is_json_like(input_type): raise TypeError( - "Input type must be an valid JSON object or JSON-formatted string type." + "Input type must be a valid JSON object or JSON-formatted string type." + f" Received type: {input_type}" ) return pd.ArrowDtype( @@ -63,7 +63,7 @@ def output_type(self, *input_types): input_type = input_types[0] if not dtypes.is_json_like(input_type): raise TypeError( - "Input type must be an valid JSON object or JSON-formatted string type." + "Input type must be a valid JSON object or JSON-formatted string type." + f" Received type: {input_type}" ) return pd.ArrowDtype( @@ -79,7 +79,7 @@ def output_type(self, *input_types): input_type = input_types[0] if input_type != dtypes.STRING_DTYPE: raise TypeError( - "Input type must be an valid JSON-formatted string type." + "Input type must be a valid JSON-formatted string type." + f" Received type: {input_type}" ) return dtypes.JSON_DTYPE @@ -93,7 +93,7 @@ def output_type(self, *input_types): input_type = input_types[0] if not dtypes.is_json_like(input_type): raise TypeError( - "Input type must be an valid JSON object or JSON-formatted string type." + "Input type must be a valid JSON object or JSON-formatted string type." + f" Received type: {input_type}" ) return dtypes.STRING_DTYPE @@ -109,7 +109,7 @@ def output_type(self, *input_types): right_type = input_types[1] if not dtypes.is_json_like(left_type): raise TypeError( - "Input type must be an valid JSON object or JSON-formatted string type." + "Input type must be a valid JSON object or JSON-formatted string type." + f" Received type: {left_type}" ) if not dtypes.is_json_encoding_type(right_type): @@ -130,7 +130,7 @@ def output_type(self, *input_types): input_type = input_types[0] if not dtypes.is_json_like(input_type): raise TypeError( - "Input type must be an valid JSON object or JSON-formatted string type." + "Input type must be a valid JSON object or JSON-formatted string type." + f" Received type: {input_type}" ) return dtypes.STRING_DTYPE