Skip to content

Got "Could not get cors config from DB" error in error log when using with PostgreSQL #17

@ethan-ho

Description

@ethan-ho

See following error generated for every request:

local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR:  operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  

I believe it's related to whereRaw('enabled = 1') in original code.
But the enabled field is actually a boolean type, which triggered type mismatch error during query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions