You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Default handleError doesn't say which remote function failed schema validation #17418
Ideally, we'd locate the file and line the remote function was called, the file its declared in, the name of the remote function, etc. while stripping internals
Reacted by Filip Gornitzka Abelson and Aman Sharma
Thanks! I’ll start with the remote function’s name and the file it’s declared in, since that looks available where validation happens. I’ll then look into whether the call-site file and line can be surfaced, and if that needs a bigger change I’ll check back here first. Does that sound good?
Hi @teemingc , I've opened #17495 covering the function name and the file it's declared in. Both are passed to handleError as remote: { name, file } and included in the default log, e.g. Remote function getUser (src/routes/users.remote.js) schema validation failed: ....
Before I look at the call site, a few questions so I don't go in the wrong direction:
For server-side calls, is the first stack frame outside Kit/node_modules (file:line) what you had in mind?
When a remote function is called from the browser, the server can't see the client call site. Should we skip it in that case?
Should call-site info be dev-only?
Is exposing remote on the public handleError input okay, or should it stay internal to the default logger?
Happy to add the call site to this PR or as a follow-up, whichever you prefer.
Activity
Aman13sh commentedon Oct 13, 2026
I’d like to work on this,
teemingc commentedon Oct 13, 2026
Ideally, we'd locate the file and line the remote function was called, the file its declared in, the name of the remote function, etc. while stripping internals
Aman13sh commentedon Oct 13, 2026
Thanks! I’ll start with the remote function’s name and the file it’s declared in, since that looks available where validation happens. I’ll then look into whether the call-site file and line can be surfaced, and if that needs a bigger change I’ll check back here first. Does that sound good?
Aman13sh commentedon Oct 20, 2026
Hi @teemingc , I've opened #17495 covering the function name and the file it's declared in. Both are passed to
handleErrorasremote: { name, file }and included in the default log, e.g.Remote function getUser (src/routes/users.remote.js) schema validation failed: ....Before I look at the call site, a few questions so I don't go in the wrong direction:
remoteon the publichandleErrorinput okay, or should it stay internal to the default logger?Happy to add the call site to this PR or as a follow-up, whichever you prefer.