我正在尝试通过 API 创建一个分类,但收到了“内部服务器错误”响应。如果我查看“错误日志”部分,可以看到在我尝试创建分类时反复出现以下错误:
ActiveRecord::ValueTooLong (PG::StringDataRightTruncation: ERROR: value too long for type character varying(6) ) /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-1.1.6/lib/patches/
这看起来很明显,对吧?但我的请求如下:
方法:POST,请求 URI:'https://xxx/categories',版本:1.1,内容:System.Net.Http.MultipartFormDataContent,标头:
{
Api-Key: xxx
Api-Username: xxx
Accept: application/json
User-Agent: lb-legacy-content-migrator
Content-Type: multipart/form-data; boundary="f86b1fe9-5a87-4794-b949-8c0fb1347cb5"
}:[
{
"Key": "name",
"Value": "Features"
},
{
"Key": "color",
"Value": "#ee00da"
},
{
"Key": "text_color",
"Value": "#000000"
},
{
"Key": "skip_validations",
"Value": "true"
}
]
我尝试过省略 skip_validations 参数,但没有变化。
我可以正常创建其他对象。
有什么想法可能导致这个问题吗?