prisma-engines icon indicating copy to clipboard operation
prisma-engines copied to clipboard

Improve error for incorrect column type in SQLite

Open timsuchanek opened this issue 5 years ago • 1 comments

When turning the underlying column of a string field into Int and then querying it without changing the schema.prisma file, the query engine returns this error:

    {
      "errors": [
        {
          "error": "Attempted to serialize scalar '123' with incompatible type 'String'",
          "user_facing_error": {
            "is_panic": false,
            "message": "Attempted to serialize scalar '123' with incompatible type 'String'",
            "backtrace": null
          }
        }
      ]
    }

It would be nice if the column that is affected would be mentioned in the error.

timsuchanek avatar Jul 02 '20 11:07 timsuchanek

Note from triage: this needs research before implementing; unclear if it's possible currently.

yoshuawuyts avatar Jul 21 '20 13:07 yoshuawuyts