Skip to content

Null in allowedOrigins in jwt causes 500 error #108

@MarekProkopec

Description

@MarekProkopec

When using JWT, if you pass null to allowedOrigins, you get error

{
    "data": null,
    "error": {
        "statusCode": 500,
        "message": "Internal server error. Contact support@vapi.ai for help."
    }
}

Example:

{
  "orgId": "xxxxxxxxxxxx",
  "token": {
    "tag": "public",
    "restrictions": {
      "enabled": true,
      "allowedOrigins": [
        null
      ],
      "allowTransientAssistant": false
    }
  },
  "iat": xxx,
  "exp": xxx
}

Of course this should not happen, since it does not make sense, but it would be nice to get some sensible error message, or handling this somehow else, since it just caused us a bit head scratching, because we had misconfigured .env variables.

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