Skip to content

Commit

Permalink
minor error message update (#3)
Browse files Browse the repository at this point in the history
Fixes an issue where the error message returned when a function exceeds its timeout includes an illegal character.
  • Loading branch information
tenczar authored Jul 31, 2018
1 parent 298934b commit ea92b50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/funky/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (e IllegalArgumentError) Error() string {
type TimeoutError string

func (e TimeoutError) Error() string {
return fmt.Sprintf("The invocation exceeded the timeout: %s", string(e))
return string(e)
}

// FunctionServerError a generic error indicating that the function server experienced an error
Expand Down
2 changes: 1 addition & 1 deletion pkg/funky/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (s *DefaultServer) Invoke(input *Message) (interface{}, error) {

if err != nil {
if isTimeout(err) {
return nil, TimeoutError(timeout)
return nil, TimeoutError("Function execution exceeded the timeout")
} else if isConnectionRefused(err) {
return nil, ConnectionRefusedError(url)
} else {
Expand Down

0 comments on commit ea92b50

Please sign in to comment.