Improve error message when reading NaN
(PostgreSQL)
#3494
Labels
kind/improvement
An improvement to existing feature and code.
team/client
Issue for team Client.
tech/engines
Issue for tech Engines.
topic: error
topic: floating point types
Topic related to floating point types and precision loss
topic: NaN
When trying to read a float column with a
NaN
value you get the following error message both withfind*
and the raw API:This was reported in prisma/prisma-client-js#797.
As the Prisma Engines currently do not support
NaN
at all (feature request tracked at #3492), we should output a more helpful error message to the user.(Rough technical information from a conversation with Julius: When we read the data, we can check if it is
NaN
and fail harder instead of trying to convert it todecimal
which causes the panic listed above)The error message can possibly also link to a documentation article that explains this limitation or Prisma further.
The text was updated successfully, but these errors were encountered: