fix: return error if parsing header fails GODT-502

This commit is contained in:
James Houlahan
2020-06-19 11:06:43 +02:00
committed by Jakub
parent 7724ca3996
commit 7301e5571c
4 changed files with 16 additions and 4 deletions

View File

@ -20,6 +20,7 @@ package pmapi
import (
"fmt"
"net/http"
"net/mail"
"regexp"
"strconv"
"strings"
@ -113,6 +114,7 @@ var (
EventItem: EventItem{ID: "hdI7aIgUO1hFplCIcJHB0jShRVsAzS0AB75wGCaiNVeIHXLmaUnt4eJ8l7c7L6uk4g0ZdXhGWG5gfh6HHgAZnw==", Action: EventCreate},
Created: &Message{
ID: "hdI7aIgUO1hFplCIcJHB0jShRVsAzS0AB75wGCaiNVeIHXLmaUnt4eJ8l7c7L6uk4g0ZdXhGWG5gfh6HHgAZnw==",
Header: make(mail.Header),
Subject: "Hey there",
},
},
@ -153,6 +155,7 @@ var (
EventItem: EventItem{ID: "msgID1", Action: EventCreate},
Created: &Message{
ID: "id",
Header: make(mail.Header),
Subject: "Hey there",
},
},
@ -160,6 +163,7 @@ var (
EventItem: EventItem{ID: "msgID2", Action: EventCreate},
Created: &Message{
ID: "id",
Header: make(mail.Header),
Subject: "Hey there again",
},
},