Skip to content

Commit

Permalink
catch blockNode == nil
Browse files Browse the repository at this point in the history
  • Loading branch information
lazynina committed Dec 31, 2024
1 parent 8add599 commit aa338c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion routes/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,12 @@ func (fes *APIServer) APIBlock(ww http.ResponseWriter, rr *http.Request) {
return
}
if blockMsg == nil {
APIAddError(ww, fmt.Sprintf("APIBlockRequest: Block with hash %v not found", blockHash))
APIAddError(ww, fmt.Sprintf("APIBlockRequest: Block with hash %v not found: %v", blockHash))
return
}

if blockNode == nil {
APIAddError(ww, fmt.Sprintf("APIBlockRequest: Block node with hash %v not found", blockHash, blockRequest))
return
}

Expand Down

0 comments on commit aa338c9

Please sign in to comment.