Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/add_contract_not_found_error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: patch
---

# Add contract not found error
3 changes: 3 additions & 0 deletions rhp/v4/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ var (
ErrHostFundError = NewRPCError(ErrorCodeHostError, "host funding error")
// ErrSectorNotFound is returned when the host is not storing a sector.
ErrSectorNotFound = NewRPCError(ErrorCodeHostError, "sector not found")
// ErrContractNotFound is returned when the host is not aware of a
// contract.
ErrContractNotFound = NewRPCError(ErrorCodeHostError, "contract not found")
// ErrNotAcceptingContracts is returned when the host is not accepting
// contracts.
ErrNotAcceptingContracts = NewRPCError(ErrorCodeHostError, "not accepting contracts")
Expand Down
1 change: 1 addition & 0 deletions rhp/v4/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func TestRPCErrorRoundTrip(t *testing.T) {
ErrNotAcceptingContracts,
ErrPricesExpired,
ErrSectorNotFound,
ErrContractNotFound,
}

buf := bytes.NewBuffer(nil)
Expand Down
Loading