Skip to content

Commit ea92b50

Browse files
authored
minor error message update (#3)
Fixes an issue where the error message returned when a function exceeds its timeout includes an illegal character.
1 parent 298934b commit ea92b50

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/funky/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func (e IllegalArgumentError) Error() string {
1919
type TimeoutError string
2020

2121
func (e TimeoutError) Error() string {
22-
return fmt.Sprintf("The invocation exceeded the timeout: %s", string(e))
22+
return string(e)
2323
}
2424

2525
// FunctionServerError a generic error indicating that the function server experienced an error

pkg/funky/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (s *DefaultServer) Invoke(input *Message) (interface{}, error) {
116116

117117
if err != nil {
118118
if isTimeout(err) {
119-
return nil, TimeoutError(timeout)
119+
return nil, TimeoutError("Function execution exceeded the timeout")
120120
} else if isConnectionRefused(err) {
121121
return nil, ConnectionRefusedError(url)
122122
} else {

0 commit comments

Comments
 (0)