Passing a string to a nested type fails to json-decode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
WSME |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
With a nested type like this:
```
class PoolPOST(
name = wtypes.
session_
class SessionPersiste
type = wtypes.
cookie_name = wtypes.
```
If you POST something like this:
```
{
"name": "hello",
"session_
}
```
It will explode when trying to decode the subobject as JSON:
```
Traceback (most recent call last):
File "python3.
pecan.
File "/usr/lib/
from_body = args_from_
File "python3.
body, datatypes, bodyarg=
File "python3.
kw = {argname: fromjson(
File "python3.
return f(*args, **kw)
File "python3.
value[
File "python3.
return f(*args, **kw)
File "python3.
value[
File "python3.
return f(*args, **kw)
File "python3.
v_keys = set(value.keys())
AttributeError: 'str' object has no attribute 'keys'
```
Changed in wsme: | |
status: | New → Confirmed |
To be clear, I wouldn't expect it to be able to parse this string, but I *would* expect it to fail validation, instead of causing a 500 response.