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
Hi!
Using the nakama typescript runtime, I faced an issue with the exceptions thrown by a nakama function called in an RPC. Currently the error we have in the client is an INTERNAL error, with message specifiying the original code and message. It is probably the current behavior, but it would be great to have the original exception as it.
Steps to Reproduce
Register a user on nakama
Create a RPC on the server like this one:
let checkCredentialsRpc: nkruntime.RpcFunction =
function (ctx: nkruntime.Context, logger: nkruntime.Logger, nk: nkruntime.Nakama, payload: string) {
const args : Credentials = JSON.parse(payload);
let result = nk.authenticateEmail(args.email, args.password, "", false);
return JSON.stringify(result);
}
Call the RPC from the client using an email not existing or bad credentials so nk.authenticateEmail will trigger an exception and check the error code (INTERNAL) and message
Expected Result
If email doesn't exist: code: NotFound and message: User account not found
If credentials don't match: code: InvalidArgument and message: Invalid credentials
Actual Result
If email doesn't exist: code: Internal and message: error authenticating: rpc error: code = NotFound desc = User account not found.)
If credentials don't match: code: Internal and message: error authenticating: rpc error: code = InvalidArgument desc = Invalid credentials.)
Context
Client: Nakama-Cpp 2.8.0
Your Environment
Instance on Heroic Cloud
Nakama: 3.17.1-r2
The text was updated successfully, but these errors were encountered:
Description
Hi!
Using the nakama typescript runtime, I faced an issue with the exceptions thrown by a nakama function called in an RPC. Currently the error we have in the client is an INTERNAL error, with message specifiying the original code and message. It is probably the current behavior, but it would be great to have the original exception as it.
Steps to Reproduce
nk.authenticateEmail
will trigger an exception and check the error code (INTERNAL) and messageExpected Result
If email doesn't exist: code:
NotFound
and message:User account not found
If credentials don't match: code:
InvalidArgument
and message:Invalid credentials
Actual Result
If email doesn't exist: code:
Internal
and message:error authenticating: rpc error: code = NotFound desc = User account not found.)
If credentials don't match: code:
Internal
and message:error authenticating: rpc error: code = InvalidArgument desc = Invalid credentials.)
Context
Client: Nakama-Cpp 2.8.0
Your Environment
The text was updated successfully, but these errors were encountered: