2
0

feat(pgproto3): expose MaxExpectedBodyLen and ActualBodyLen in ExceededMaxBodyLenErr struct

This commit is contained in:
jeremy.spriet
2024-01-03 11:50:45 +01:00
committed by Jack Christensen
parent f654d61d79
commit 1fdd17041a
+3 -3
View File
@@ -71,12 +71,12 @@ func (e *writeError) Unwrap() error {
}
type ExceededMaxBodyLenErr struct {
maxExpectedBodyLen int
actualBodyLen int
MaxExpectedBodyLen int
ActualBodyLen int
}
func (e *ExceededMaxBodyLenErr) Error() string {
return fmt.Sprintf("invalid body length: expected at most %d, but got %d", e.maxExpectedBodyLen, e.actualBodyLen)
return fmt.Sprintf("invalid body length: expected at most %d, but got %d", e.MaxExpectedBodyLen, e.ActualBodyLen)
}
// getValueFromJSON gets the value from a protocol message representation in JSON.