Skip to content

Endpoint should check that payloads can be converted to param #127

@nsoblath

Description

@nsoblath

File: endpoint.py
Class: Endpoint
Functions:

  • do_set_request()
  • do_get_request()
  • do_cmd_request()

Each of those has a line that's something like:

return a_request_message.reply(payload=scarab.to_param(result))

There's no check for whether the result object can in fact be converted to param. Instead, this should be done in a try block to catch the case in which the result cannot be converted to a python object. In that case the return message should have an error return code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions