diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2022-07-03 14:56:52 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2022-07-03 14:56:52 -0700 |
| commit | 9174dbe8a9057e240fd9c3825c5720d13f2fafc2 (patch) | |
| tree | ecca9772097ff0804beb2df14efdf5a005fa09d3 /hotline/transaction.go | |
| parent | 327d35f92fc5a642f6f11dce1a18601904634e48 (diff) | |
Add error message handling to client
Diffstat (limited to 'hotline/transaction.go')
| -rw-r--r-- | hotline/transaction.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hotline/transaction.go b/hotline/transaction.go index 88e17df..9b0ac40 100644 --- a/hotline/transaction.go +++ b/hotline/transaction.go @@ -1,6 +1,7 @@ package hotline import ( + "bytes" "encoding/binary" "errors" "fmt" @@ -238,3 +239,7 @@ func (t *Transaction) GetField(id int) Field { return Field{} } + +func (t *Transaction) IsError() bool { + return bytes.Compare(t.ErrorCode, []byte{0, 0, 0, 1}) == 0 +} |