mirror of https://github.com/jackc/pgx.git
feat(pgproto3): expose MaxExpectedBodyLen and ActualBodyLen in ExceededMaxBodyLenErr struct
parent
f654d61d79
commit
1fdd17041a
|
@ -71,12 +71,12 @@ func (e *writeError) Unwrap() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
type ExceededMaxBodyLenErr struct {
|
type ExceededMaxBodyLenErr struct {
|
||||||
maxExpectedBodyLen int
|
MaxExpectedBodyLen int
|
||||||
actualBodyLen int
|
ActualBodyLen int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ExceededMaxBodyLenErr) Error() string {
|
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.
|
// getValueFromJSON gets the value from a protocol message representation in JSON.
|
||||||
|
|
Loading…
Reference in New Issue