Skip to content

Default value for options in Parse.Cloud.run is no longer set #2773

@modime

Description

@modime

New Issue Checklist

Issue Description

In v5.3.0 a default value was set in Parse.Cloud.run(...) when the parameter options wasn't set, but in v6.0.0 this was removed. This lead to different behaviour and broken changes.

Steps to reproduce

await expect(Parse.Cloud.run(endpoint, data, null)).rejects.toMatchObject({
code: 141,
message: 'Invalid request.',
});

Actual Outcome

Parse.Cloud.run(endpoint, data, null)

Parse SDK validates the options parameter before even sending the request to the server and the SDK throws this error immediately.

TypeError: request options must be of type Object

Expected Outcome

The call should be handled by the server and respond with proper Parse Server codes. Like this example:

await expect(Parse.Cloud.run(endpoint, data, null)).rejects.toMatchObject({
    code: 141,
    message: 'Invalid request.',
});

Environment

Server

  • Parse Server version: 8.3.0-alpha.12
  • Operating system: Mac, Node 22.20.0
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 8.0.15
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Local

Client

  • Parse JS SDK version: 6.0.0+

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions