Skip to content

Invalid session error is not returned as normal Parse error, but as server error #6684

Closed
@sarsonj

Description

@sarsonj

Issue Description

We are using Parse API to check, if session is still valid and if not, we do logout internally and show login screen. It worked till we upgraded to newest Parse server 4.2.0 (till then we had 3.9.0). However, now the server returns generic error 500 without any info about specific error (invalid session in this case).

Steps to reproduce

Call for example /users/me REST API with non existing sessionID.

Expected Results

I expected to get Parse specific response with error INVALID_SESSION_TOKEN, as it worked with previous versions of Parse server

Actual Outcome

I get Error 500 - interval server error

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 4.2.0
    • Operating System: linux / docker
    • Localhost or remote server? Digital Ocean k8s
  • Database

    • PosgreSql: PostgreSQL 11
    • Localhost or remote server? Digital Ocean

Logs/Trace

Callstack:

Error: Invalid session token
at Object.getAuthForSessionToken (/opt/app/node_modules/parse-server/lib/Auth.js:114:11)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)

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