The 422 error response body of PATCH /api/auth/users/{user_id} changed in version 2.20.0:
In version 2.19.4:
{
"detail": [
{
"type": "string_too_short",
"loc": [
"body",
"project_dirs",
1
],
"msg": "String should have at least 1 character",
"input": "",
"ctx": {
"min_length": 1
}
}
]
}
In version 2.20.0:
{
"detail": [
{
"type": "string_too_short",
"loc": [
"body",
"project_dirs",
1,
"function-after[val_os_path_normpath(), function-after[val_no_dotdot_in_path(), function-after[val_absolute_path(), constrained-str]]]"
],
"msg": "String should have at least 1 character",
"input": "",
"ctx": {
"min_length": 1
}
},
{
"type": "string_too_short",
"loc": [
"body",
"project_dirs",
1,
"function-after[val_s3_url(), constrained-str]"
],
"msg": "String should have at least 1 character",
"input": "",
"ctx": {
"min_length": 1
}
}
]
}
Is this expected? I noticed this because it breaks the handling of the error message in fractal-web.
In the past the error was nicely displayed near the field:
Now it fallbacks to:
Questions:
- Should fractal-web adapt to this change?
- Is it possible to add some tests in fractal-server to detect this kind of changes in error response payloads?
- Could this affect also other endpoints?
The 422 error response body of
PATCH /api/auth/users/{user_id}changed in version 2.20.0:In version 2.19.4:
{ "detail": [ { "type": "string_too_short", "loc": [ "body", "project_dirs", 1 ], "msg": "String should have at least 1 character", "input": "", "ctx": { "min_length": 1 } } ] }In version 2.20.0:
{ "detail": [ { "type": "string_too_short", "loc": [ "body", "project_dirs", 1, "function-after[val_os_path_normpath(), function-after[val_no_dotdot_in_path(), function-after[val_absolute_path(), constrained-str]]]" ], "msg": "String should have at least 1 character", "input": "", "ctx": { "min_length": 1 } }, { "type": "string_too_short", "loc": [ "body", "project_dirs", 1, "function-after[val_s3_url(), constrained-str]" ], "msg": "String should have at least 1 character", "input": "", "ctx": { "min_length": 1 } } ] }Is this expected? I noticed this because it breaks the handling of the error message in fractal-web.
In the past the error was nicely displayed near the field:
Now it fallbacks to:
Questions: