1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 10:07:02 +00:00

Missing message is now 404 instead of 500

- Added smtpd.ErrNotExist to make detecting missing message easier
- Return 404 instead of 500 when requesting a non-extistant message
- More REST unit tests
This commit is contained in:
James Hillyerd
2013-11-14 15:08:46 -08:00
parent 8b7fbfda6a
commit d98e6a2b58
4 changed files with 199 additions and 4 deletions

View File

@@ -1,12 +1,15 @@
package smtpd
import (
"errors"
"github.com/jhillyerd/go.enmime"
"io"
"net/mail"
"time"
)
var ErrNotExist = errors.New("Message does not exist")
type DataStore interface {
MailboxFor(emailAddress string) (Mailbox, error)
AllMailboxes() ([]Mailbox, error)