Skip to content

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

@stubailo

Description

@stubailo

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/mg-api-js@2.0.4/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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions