Skip to content

Commit

Permalink
Merge pull request #507 from onflow/filter-out-method-not-found-errors
Browse files Browse the repository at this point in the history
Filter out errors for missing endpoints as they are not really relevant
  • Loading branch information
sideninja authored Sep 2, 2024
2 parents 305ac9b + b4c9f97 commit ba1c3e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ type responseHandler struct {
metrics metrics.Collector
}

const errMethodNotFound = -32601
const errCodePanic = -32603

type jsonError struct {
Expand Down Expand Up @@ -455,6 +456,8 @@ func (w *responseHandler) Write(data []byte) (int, error) {
switch message.Error.Code {
case errCodePanic:
w.metrics.ServerPanicked(errMsg)
case errMethodNotFound:
break
default:
if errMsg == "" {
break
Expand Down

0 comments on commit ba1c3e5

Please sign in to comment.