Skip to content

Error in marshalling can cause a TypeError #75

@robyoung

Description

@robyoung

Code

from flask_restx import Model, marshal, fields

model = Model('Test', {'field': fields.Float()})

marshal({'field': {'min': '12.1', 'max': '12.2'}}, model)

Expected Behavior

Given the example code I would expect to receive a MarshallingError with a useful error message directing me to where the problem is.

Actual Behavior

I receive a TypeError only telling me the underlying error with no context.

Environment

  • Python version: 3.8
  • Flask version: 1.1.1
  • Flask-RESTX version: 0.1.1

Additional Context

I have a PR incoming for this. I am opening this issue as that is what the CONTRIBUTING guidelines suggest.

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