File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,15 @@ type Params = {
6262 };
6363 };
6464 bodyLimit? : number ;
65+ // error catcher settings
66+ error? : {
67+ /**
68+ * throw: 默认模式,直接报错走 fastify 的 error catch
69+ * json: 将会以 json 形式返回错误
70+ * str: 将会以 str 形式返回错误,并且只保留 message
71+ */
72+ mode? : " throw" | " json" | " str" ;
73+ };
6574};
6675```
6776
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ const all_safety_category = [
3030 HarmCategory . HARM_CATEGORY_HARASSMENT ,
3131 HarmCategory . HARM_CATEGORY_HATE_SPEECH ,
3232 HarmCategory . HARM_CATEGORY_SEXUALLY_EXPLICIT ,
33- "HARM_CATEGORY_CIVIC_INTEGRITY" as any as HarmCategory ,
33+ // "HARM_CATEGORY_CIVIC_INTEGRITY" as any as HarmCategory,
3434 // HarmCategory.HARM_CATEGORY_UNSPECIFIED,
3535] ;
3636const all_none_safety_settings = {
You can’t perform that action at this time.
0 commit comments