Skip to content

Commit

Permalink
check for nil for evt.Response (#1007)
Browse files Browse the repository at this point in the history
* check for nil for evt.Response

* bump version to 1.5.1-rc2

* make docsgen
  • Loading branch information
nonsense authored Nov 24, 2022
1 parent edab3de commit 2c5604e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file modified build/openrpc/boost.json.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion build/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package build

var CurrentCommit string

const BuildVersion = "1.5.1-rc1"
const BuildVersion = "1.5.1-rc2"

func UserVersion() string {
return BuildVersion + CurrentCommit
Expand Down
4 changes: 2 additions & 2 deletions retrievalmarket/rtvllog/retrieval_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ func (r *RetrievalLog) OnQueryEvent(evt retrievalmarket.ProviderQueryEvent) {
// Storage Provider validates the request (eg checking its parameters for
// validity, checking for acceptance against the retrieval filter, etc)
func (r *RetrievalLog) OnValidationEvent(evt retrievalmarket.ProviderValidationEvent) {
log.Debugw("validation-event", "id", evt.Response.ID, "status", evt.Response.Status, "msg", evt.Response.Message, "err", evt.Error)

// Ignore ErrPause and ErrResume because they are signalling errors, not
// actual errors because of incorrect behaviour.
if evt.Error == nil || evt.Error == datatransfer.ErrPause || evt.Error == datatransfer.ErrResume {
Expand All @@ -64,6 +62,8 @@ func (r *RetrievalLog) OnValidationEvent(evt retrievalmarket.ProviderValidationE
Message: evt.Error.Error(),
}
if evt.Response != nil {
log.Debugw("validation-event", "id", evt.Response.ID, "status", evt.Response.Status, "msg", evt.Response.Message, "err", evt.Error)

st.DealID = evt.Response.ID
st.Status = evt.Response.Status.String()
if evt.Response.Message != "" {
Expand Down

0 comments on commit 2c5604e

Please sign in to comment.