Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Openwhisk Returned HTTP 400 (Bad Request) --> "The request content was malformed: #181

Open
@michaelwclark

Description

@michaelwclark

If an environment variable or another default parameter is not properly set then sls deploy will throw an error. The error that displays is only:
Returned HTTP 400 (Bad Request) --> "The request content was malformed:

However under the covers if you add additional logging you will find.

 message:
   'PUT https://us-south.functions.cloud.ibm.com/api/v1/namespaces/OURNAMESPACE/actions/add-users?overwrite=true Returned HTTP 400 (Bad Request) --> "The request content was malformed:\nparameters malformed!"',
  error:
   { code: '5e5ddc3f2084d2c18cbdbfc66e8665cc',
     error: 'The request content was malformed:\nparameters malformed!' },
  statusCode: 400 }

I feel like there should be a preflight check fo parameters or at the very least a more verbose error message when this happens as it's not 100% apparent what is causing the error without going into the code and adding a log node_modules/serverless-openwhisk/deployFunction/index.js:70

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