-
-
Notifications
You must be signed in to change notification settings - Fork 392
Description
Problem
I am trying to convert a column to a different type. The conversion doesn't work for some reason and I get a "Average mass kg" cannot be cast to numeric.
when I click the save
button. When I check the chrome tools I see that it issues a PATCH request to http://127.0.0.1:8000/api/db/v0/tables/2/columns/10/
with the following payload {"type":"numeric","type_options":{"precision":6,"scale":3},"display_options":null,"default":null}
; the response is
[
{
"code": 4203,
"message": "\"Average mass kg\" cannot be cast to numeric.",
"field": null,
"detail": null
}
]
My understanding is that there's some SQL related exception that is caught and handled properly. However I don't see anything on my logs. The exception must be output somewhere (ideally on the logs) so we can debug the issue.
Proposed solution
Properly log the SQL errror.
Additional context
This is because of the big try-catch on https://github.com/centerofci/mathesar/blob/develop/mathesar/api/db/viewsets/columns.py#L110. The stacktrace should be printed on all cases.