Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: JSONRPCError - Invalid session @ '<database>' #56

Open
stubailo opened this issue Sep 11, 2023 · 0 comments
Open

Error: JSONRPCError - Invalid session @ '<database>' #56

stubailo opened this issue Sep 11, 2023 · 0 comments

Comments

@stubailo
Copy link

stubailo commented Sep 11, 2023

Hi, what's the recommended solution for handling expired or invalid sessions? I was thinking that mg-api-js would automatically re-authenticate if the session expires, but looks like it didn't in this case, as we were repeatedly getting this error repeatedly:

Sep 11 03:21:30 PM  Error: JSONRPCError - Invalid session @ '<database>'
Sep 11 03:21:30 PM      at /opt/render/project/src/app/node_modules/.pnpm/[email protected]/node_modules/mg-api-js/dist/webpack:/GeotabApi/lib/ApiHelper.js:154:31

Should we be catching invalid sessions when we call the API and re-authenticating if we see one? What's the best way to identify an error that indicates an expired or invalid session?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant