他是完整的错误轨迹
{
"message": {
"error": {
"isJoi": true,
"name": "ValidationError",
"details": [
{
"message": "\"__parentArray\" is not allowed",
"path": [
"holidays",
0,
"__parentArray"
],
"type": "object.allowUnknown",
"context": {
"child": "__parentArray",
"value": [
{
"_id": "5daf5e657f19e312de414613",
"day": 1,
"month": 2,
"description": "test"
}
],
"key": "__parentArray",
"label": "__parentArray"
}
},
{
"message": "\"__index\" is not allowed",
"path": [
"holidays",
0,
"__index"
],
"type": "object.allowUnknown",
"context": {
"child": "__index",
"value": 0,
"key": "__index",
"label": "__index"
}
},
{
"message": "\"$isDocumentArrayElement\" is not allowed",
"path": [
"holidays",
0,
"$isDocumentArrayElement"
],
"type": "object.allowUnknown",
"context": {
"child": "$isDocumentArrayElement",
"value": true,
"key": "$isDocumentArrayElement",
"label": "$isDocumentArrayElement"
}
},
{
"message": "\"$__\" is not allowed",
"path": [
"holidays",
0,
"$__"
],
"type": "object.allowUnknown",
"context": {
"child": "$__",
"value": {
"strictMode": true,
"getters": {},
"_id": "5daf5e657f19e312de414613",
"wasPopulated": false,
"activePaths": {
"paths": {
"description": "modify",
"month": "modify",
"day": "modify",
"_id": "default"
},
"states": {
"ignore": {},
"default": {
"_id": true
},
"init": {},
"modify": {
"day": true,
"month": true,
"description": true
},
"require": {}
},
"stateNames": [
"require",
"modify",
"init",
"default",
"ignore"
]
},
"pathsToScopes": {},
"cachedRequired": {},
"session": null,
"$setCalled": {},
"ownerDocument": {
"states": [
"test1",
"test2",
"test3",
"test34"
],
"_id": "5daf5e657f19e312de414612",
"name": "TestCountry",
"holidays": [
{
"_id": "5daf5e657f19e312de414613",
"day": 1,
"month": 2,
"description": "test"
}
]
},
"fullPath": "holidays",
"emitter": {
"_events": {},
"_eventsCount": 2,
"_maxListeners": 0
},
"$options": {}
},
"key": "$__",
"label": "$__"
}
},
{
"message": "\"isNew\" is not allowed",
"path": [
"holidays",
0,
"isNew"
],
"type": "object.allowUnknown",
"context": {
"child": "isNew",
"value": true,
"key": "isNew",
"label": "isNew"
}
},
{
"message": "\"errors\" is not allowed",
"path": [
"holidays",
0,
"errors"
],
"type": "object.allowUnknown",
"context": {
"child": "errors",
"key": "errors",
"label": "errors"
}
},
{
"message": "\"_doc\" is not allowed",
"path": [
"holidays",
0,
"_doc"
],
"type": "object.allowUnknown",
"context": {
"child": "_doc",
"value": {
"_id": "5daf5e657f19e312de414613",
"day": 1,
"month": 2,
"description": "test"
},
"key": "_doc",
"label": "_doc"
}
},
{
"message": "\"$locals\" is not allowed",
"path": [
"holidays",
0,
"$locals"
],
"type": "object.allowUnknown",
"context": {
"child": "$locals",
"value": {},
"key": "$locals",
"label": "$locals"
}
}
],
"_object": {
"states": [
"test1",
"test2",
"test3",
"test34"
],
"_id": "5daf5e657f19e312de414612",
"name": "TestCountry",
"holidays": [
{
"_id": "5daf5e657f19e312de414613",
"day": 1,
"month": 2,
"description": "test"
}
]
}
},
"value": {
"states": [
"test1",
"test2",
"test3",
"test34"
],
"_id": "5daf5e657f19e312de414612",
"name": "TestCountry",
"holidays": [
{
"_id": "5daf5e657f19e312de414613",
"day": 1,
"month": 2,
"description": "test"
}
]
}
},
"data": {
"states": [
"test1",
"test2",
"test3",
"test34"
],
"_id": "5daf5e657f19e312de414612",
"name": "TestCountry",
"holidays": [
{
"_id": "5daf5e657f19e312de414613",
"day": 1,
"month": 2,
"description": "test"
}
]
}
}