Added to error logging details

This commit is contained in:
mitchelljfs 2018-10-13 14:08:14 -07:00
parent ada0c0871a
commit ecdb0bed84
2 changed files with 22 additions and 4 deletions

22
Gopkg.lock generated
View File

@ -3,51 +3,67 @@
[[projects]]
branch = "master"
digest = "1:9fd3a6ab34bb103ba228eefd044d3f9aa476237ea95a46d12e8cccd3abf3fea2"
name = "github.com/armon/go-radix"
packages = ["."]
pruneopts = "UT"
revision = "1fca145dffbcaa8fe914309b1ec0cfc67500fe61"
[[projects]]
digest = "1:5580dfd33541011ae489dde24be4db55f1de8eaff11165d469342d95a7c0f790"
name = "github.com/aws/aws-lambda-go"
packages = ["events"]
pruneopts = "UT"
revision = "4d30d0ff60440c2d0480a15747c96ee71c3c53d4"
version = "v1.2.0"
[[projects]]
branch = "master"
digest = "1:f14d1b50e0075fb00177f12a96dd7addf93d1e2883c25befd17285b779549795"
name = "github.com/gopherjs/gopherjs"
packages = ["js"]
pruneopts = "UT"
revision = "0892b62f0d9fb5857760c3cfca837207185117ee"
[[projects]]
digest = "1:1e15f4e455f94aeaedfcf9c75b3e1c449b5acba1551c58446b4b45be507c707b"
name = "github.com/jtolds/gls"
packages = ["."]
pruneopts = "UT"
revision = "77f18212c9c7edc9bd6a33d383a7b545ce62f064"
version = "v4.2.1"
[[projects]]
digest = "1:cc1c574c9cb5e99b123888c12b828e2d19224ab6c2244bda34647f230bf33243"
name = "github.com/smartystreets/assertions"
packages = [
".",
"internal/go-render/render",
"internal/oglematchers"
"internal/oglematchers",
]
pruneopts = "UT"
revision = "7678a5452ebea5b7090a6b163f844c133f523da2"
version = "1.8.3"
[[projects]]
digest = "1:a3e081e593ee8e3b0a9af6a5dcac964c67a40c4f2034b5345b2ad78d05920728"
name = "github.com/smartystreets/goconvey"
packages = [
"convey",
"convey/gotest",
"convey/reporting"
"convey/reporting",
]
pruneopts = "UT"
revision = "9e8dc3f972df6c8fcc0375ef492c24d0bb204857"
version = "1.6.3"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "5da761903d61cf9e47d309477db924d6e310f97fbd7c553ff46af570b65d4356"
input-imports = [
"github.com/armon/go-radix",
"github.com/aws/aws-lambda-go/events",
"github.com/smartystreets/goconvey/convey",
]
solver-name = "gps-cdcl"
solver-version = 1

View File

@ -114,6 +114,7 @@ func (r *APIGRouter) Respond() events.APIGatewayProxyResponse {
endpointTree = r.endpoints[r.request.HTTPMethod]
path = strings.TrimPrefix(r.request.Path, r.prefix)
inPath = path
response = events.APIGatewayProxyResponse{}
splitPath = stripSlashesAndSplit(path)
)
@ -165,7 +166,8 @@ func (r *APIGRouter) Respond() events.APIGatewayProxyResponse {
status = 400
}
log.Printf("%v error: %v", status, err.Error())
log.Printf("%v %v %v error: %v \n", r.request.HTTPMethod, inPath, status, err.Error())
log.Println("error causing body: " + r.request.Body)
response.StatusCode = status
response.Body = string(respbody)
response.Headers = r.headers