summaryrefslogtreecommitdiff
path: root/vendor/github.com/jackc/pgx/v5/pgproto3/pgproto3.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/jackc/pgx/v5/pgproto3/pgproto3.go')
-rw-r--r--vendor/github.com/jackc/pgx/v5/pgproto3/pgproto3.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/github.com/jackc/pgx/v5/pgproto3/pgproto3.go b/vendor/github.com/jackc/pgx/v5/pgproto3/pgproto3.go
index ef5a54896..8df383c2c 100644
--- a/vendor/github.com/jackc/pgx/v5/pgproto3/pgproto3.go
+++ b/vendor/github.com/jackc/pgx/v5/pgproto3/pgproto3.go
@@ -70,6 +70,15 @@ func (e *writeError) Unwrap() error {
return e.err
}
+type ExceededMaxBodyLenErr struct {
+ 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)
+}
+
// getValueFromJSON gets the value from a protocol message representation in JSON.
func getValueFromJSON(v map[string]string) ([]byte, error) {
if v == nil {