Skip to content

Commit

Permalink
feat(pgproto3): expose MaxExpectedBodyLen and ActualBodyLen in Exceed…
Browse files Browse the repository at this point in the history
…edMaxBodyLenErr struct
  • Loading branch information
jeremy.spriet authored and jackc committed Jan 13, 2024
1 parent f654d61 commit 1fdd170
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pgproto3/pgproto3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1fdd170

Please sign in to comment.