Simpler error message if Response is formatted wrong
Why?
Original msg was cryptic and caused me confusion.
BeforeTypeError: The view function did not return a valid response. The return type must be a string, dict, list, tuple with headers or status, Response instance, or WSGI callable, but it was a set.
Now
Unable to create valid Potassium Response, please ensure your Response objects contain valid json, status code)
How did you test it works without regressions?
Tested local with failed json return, tested with np array return (threw expected error json can't be serialized), success case returns
If this is a new feature what may a critical error (P0) look like?
N/a given it's already an exception being thrown.
Things to consider to not repeat mistakes we've learned from many times
[ ] If P0 errors fire do we ping team in some obvious way (e.g., slack)?
[x] Are there debug logs + a way to see these logs if we need to debug?
[x] Is this documented enough a dev could work on this code without getting stuck or having to ping you?
What is this?
Simpler error message if Response is formatted wrong
Why?
Original msg was cryptic and caused me confusion.
Before
TypeError: The view function did not return a valid response. The return type must be a string, dict, list, tuple with headers or status, Response instance, or WSGI callable, but it was a set.
Now Unable to create valid Potassium Response, please ensure your Response objects contain valid json, status code)
How did you test it works without regressions?
Tested local with failed json return, tested with np array return (threw expected error json can't be serialized), success case returns
If this is a new feature what may a critical error (P0) look like?
N/a given it's already an exception being thrown.
Things to consider to not repeat mistakes we've learned from many times