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
import (
"encoding/json"
"log"
"net/http"
"github.com/ethereum-optimism/optimism/indexer/database"
......@@ -101,9 +100,6 @@ func NewApi(bv database.BridgeView) *Api {
}
func (a *Api) Listen(port string) {
err := http.ListenAndServe(port, a.Router)
if err != nil {
log.Fatal("Http server failed to start listening", err)
}
func (a *Api) Listen(port string) error {
return http.ListenAndServe(port, a.Router)
}
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