Skip to content
Snippets Groups Projects
Verified Commit 9e8871f4 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

feat: remove unused type & code

parent 27a2c77a
No related branches found
No related tags found
No related merge requests found
......@@ -35,9 +35,6 @@ func statusCodeFromError(err error) (code int, response ErrorResponse) {
response = ErrorResponse{Error: err.Error()}
switch err.(type) {
case *store.ErrFileInUse:
code = http.StatusConflict
response.Detail = err
case store.ErrInvalidMetadataField:
code = http.StatusBadRequest
case store.ErrInvalidPlaylistEntry:
......
......@@ -46,14 +46,6 @@ var (
ErrPlaylistHasMultipleNullDurationEntries = errors.New("playlists may only have one entry without a duration")
)
type ErrFileInUse struct {
Playlists []Playlist `json:"playlists"`
}
func (e *ErrFileInUse) Error() string {
return fmt.Sprintf("the file is still in use by %d playlist(s)", len(e.Playlists))
}
type ErrInvalidMetadataField string
func (e ErrInvalidMetadataField) Error() string {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment