File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ func bodyDecodeErrorHandler(
2525 // Check which field failed
2626 fieldName := unmarshalTypeError .Field
2727 fieldTypeName := unmarshalTypeError .Type .Name ()
28- fieldValue := unmarshalTypeError .Value
2928
3029 // Check if the field name is empty
3130 if fieldName != "" {
@@ -35,9 +34,8 @@ func bodyDecodeErrorHandler(
3534 gonethttpresponse .NewFieldError (
3635 fieldName ,
3736 fmt .Sprintf (
38- ErrFieldInvalidValue ,
37+ ErrInvalidFieldValueType ,
3938 fieldTypeName ,
40- fieldValue ,
4139 ),
4240 http .StatusBadRequest ,
4341 ),
Original file line number Diff line number Diff line change 88 ErrNilEncoder = errors .New ("json encoder is nil" )
99 ErrNilDecoder = errors .New ("json decoder is nil" )
1010 ErrUnmarshalBodyDataFailed = errors .New ("failed to unmarshal json body data" )
11- ErrFieldInvalidValue = "field has an invalid value %v, it must be %v"
11+ ErrInvalidFieldValueType = "invalid field value type, expected: %v"
1212)
You can’t perform that action at this time.
0 commit comments