Skip to content

Commit

Permalink
Ensure resource busy errors are tracked in metrics (#1585)
Browse files Browse the repository at this point in the history
Only ErrInternal is tracked in our metrics, and the starknet_call was not returning an ErrInternal on ResourceBusy errors.
  • Loading branch information
joshklop authored and wojciechos committed Dec 20, 2023
1 parent ac0f6c9 commit bc8e51d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@ func (h *Handler) Call(call FunctionCall, id BlockID) ([]*felt.Felt, *jsonrpc.Er
call.Calldata, blockNumber, header.Timestamp, state, h.network)
if err != nil {
if errors.Is(err, utils.ErrResourceBusy) {
return nil, ErrUnexpectedError.CloneWithData(err.Error())
return nil, ErrInternal.CloneWithData(err.Error())
}
return nil, makeContractError(err)
}
Expand Down

0 comments on commit bc8e51d

Please sign in to comment.