infinity
infinity
PPrisma
Created by infinity on 7/23/2024 in #help-and-questions
Getting P2023 When getting params
I am getting this error message when getting params with the id:
code: 'P2023',
clientVersion: '5.17.0',
meta: {
modelName: 'User',
message: 'Malformed ObjectID: provided hex string representation must be exactly 12 bytes, instead got: "undefined", length 9.'
}
}
GET /api/users/undefined 500 in 649ms
{
message: 'Failed to fetch user',
error: {
name: 'PrismaClientKnownRequestError',
code: 'P2023',
clientVersion: '5.17.0',
meta: {
modelName: 'User',
message: 'Malformed ObjectID: provided hex string representation must be exactly 12 bytes, instead got: "undefined", length 9.'
}
}
}
code: 'P2023',
clientVersion: '5.17.0',
meta: {
modelName: 'User',
message: 'Malformed ObjectID: provided hex string representation must be exactly 12 bytes, instead got: "undefined", length 9.'
}
}
GET /api/users/undefined 500 in 649ms
{
message: 'Failed to fetch user',
error: {
name: 'PrismaClientKnownRequestError',
code: 'P2023',
clientVersion: '5.17.0',
meta: {
modelName: 'User',
message: 'Malformed ObjectID: provided hex string representation must be exactly 12 bytes, instead got: "undefined", length 9.'
}
}
}
4 replies