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
Runtime: JavaScript. If you catch error (with try/catch) and throw it again, message in log will point to the place of rethrowing, not the original error throwing place. That breaks the error tracing a lot.
Steps to Reproduce
Build and run Nakama with following TypeScript module code:
let TEST_RPC: nkruntime.RpcFunction = function (ctx: nkruntime.Context, logger: nkruntime.Logger, nk: nkruntime.Nakama, payload: string): string {
try {
throw new Error('test_error');
} catch (e) {
throw e;
}
}
let InitModule: nkruntime.InitModule = function (
ctx: nkruntime.Context,
logger: nkruntime.Logger,
nk: nkruntime.Nakama,
initializer: nkruntime.Initializer
) {
initializer.registerRpc('TEST_RPC', TEST_RPC);
}
Expected Result
Error message in log points at line "throw new Error('test_error');"
Actual Result
Error message in log points at line "throw e;"
Your Environment
Nakama: 3.10.0
Database: PostgreSQL from Docker image postgres:14.1-alpine
Environment name and version: Docker image heroiclabs/nakama:3.10.0
Operating System and version: WSL2 on Windows 10
The text was updated successfully, but these errors were encountered:
Description
Runtime: JavaScript. If you catch error (with try/catch) and throw it again, message in log will point to the place of rethrowing, not the original error throwing place. That breaks the error tracing a lot.
Steps to Reproduce
Build and run Nakama with following TypeScript module code:
Expected Result
Error message in log points at line "throw new Error('test_error');"
Actual Result
Error message in log points at line "throw e;"
Your Environment
The text was updated successfully, but these errors were encountered: