nestjs-typeorm-paginate
nestjs-typeorm-paginate copied to clipboard
EntityPropertyNotFound cause the server to stop
Hello, i'm trying to build a generic service using this module.
It can result in using property not present in the entity, in the where clause of the FindManyOptions object passed to the paginate function.
I tried to surround the function with a try catch, but the EntityPropertyNotFound still persists and the server still stops.
After modifiying generated source coude (paginate.js), i found that it comes from the line 121 :
const [items, total] = yield Promise.all(promises);
The yield keyword is making the code fail, and stopping the server. With an await it works perfectly. I know you guys used an await in your .ts file, but is there something on your side or mine, to do to catch this error and let the server keep running despite the exception being raised ?
I'm working on Windows 11, with the repository version of the paginate function.
Let me know if you need some of my code.