Skip to content

Commit

Permalink
fix: solve TODO default handler (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrPsychick authored Sep 3, 2022
1 parent 974e60a commit 491fd4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
profile.cov
4 changes: 1 addition & 3 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package alexa

import (
"context"
"errors"
"fmt"
"io"
"net/http"
Expand Down Expand Up @@ -70,9 +69,8 @@ func (s *Server) Invoke(ctx context.Context, payload []byte) ([]byte, error) {

// Serve serves the handler.
func (s *Server) Serve() error {
// TODO: decide if we want a DefaultServeMux
if s.Handler == nil {
return errors.New("alexa: cannot serve empty handler")
s.Handler = DefaultServerMux
}

lambda.Start(s)
Expand Down

0 comments on commit 491fd4a

Please sign in to comment.