Commit 4d62a590 authored by Will Cory's avatar Will Cory

fix(indexer): return listen error in api

squash me: fix api unused import
parent 76980a01
...@@ -2,7 +2,6 @@ package api ...@@ -2,7 +2,6 @@ package api
import ( import (
"encoding/json" "encoding/json"
"log"
"net/http" "net/http"
"github.com/ethereum-optimism/optimism/indexer/database" "github.com/ethereum-optimism/optimism/indexer/database"
...@@ -101,9 +100,6 @@ func NewApi(bv database.BridgeView) *Api { ...@@ -101,9 +100,6 @@ func NewApi(bv database.BridgeView) *Api {
} }
func (a *Api) Listen(port string) { func (a *Api) Listen(port string) error {
err := http.ListenAndServe(port, a.Router) return http.ListenAndServe(port, a.Router)
if err != nil {
log.Fatal("Http server failed to start listening", err)
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment