Skip to content

Commit

Permalink
Use log.Error instead of log.Fatal for json parsing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ManiacTwister committed Jan 23, 2019
1 parent d2252a7 commit cc55cdb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions input/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func (m GitlabModule) GetHandler() http.HandlerFunc {
log.Printf("Got a Hook for a Pipeline Event")
var pipelineEvent PipelineEvent
if err := decoder.Decode(&pipelineEvent); err != nil {
log.Fatal(err)
log.Error(err)
return
}

Expand Down Expand Up @@ -303,7 +303,7 @@ func (m GitlabModule) GetHandler() http.HandlerFunc {
log.Printf("Got a Hook for a Job Event")
var jobEvent JobEvent
if err := decoder.Decode(&jobEvent); err != nil {
log.Fatal(err)
log.Error(err)
return
}

Expand All @@ -328,7 +328,7 @@ func (m GitlabModule) GetHandler() http.HandlerFunc {
log.Printf("Got Hook for a Merge Request")
var mergeEvent MergeEvent
if err := decoder.Decode(&mergeEvent); err != nil {
log.Fatal(err)
log.Error(err)
return
}

Expand All @@ -342,7 +342,7 @@ func (m GitlabModule) GetHandler() http.HandlerFunc {
log.Printf("Got Hook for an Issue")
var issueEvent IssueEvent
if err := decoder.Decode(&issueEvent); err != nil {
log.Fatal(err)
log.Error(err)
return
}

Expand All @@ -356,7 +356,7 @@ func (m GitlabModule) GetHandler() http.HandlerFunc {
log.Printf("Got Hook for a Push Event")
var pushEvent PushEvent
if err := decoder.Decode(&pushEvent); err != nil {
log.Println(err)
log.Error(err)
return
}

Expand Down

0 comments on commit cc55cdb

Please sign in to comment.