Skip to content

Commit

Permalink
Error failed to save pattern
Browse files Browse the repository at this point in the history
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
  • Loading branch information
leecalcote committed Sep 15, 2023
1 parent 7df5402 commit 1906ae4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/handlers/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ func ErrDeleteFilter(err error) error {
}

func ErrSavePattern(err error) error {
return errors.New(ErrSavePatternCode, errors.Alert, []string{"Error failed to save pattern"}, []string{err.Error()}, []string{"Cannot save the Pattern due to wrong path or URL"}, []string{"Check if the given path or URL of the Pattern is correct"})
return errors.New(ErrSavePatternCode, errors.Alert, []string{"Error failed to save design"}, []string{err.Error()}, []string{"Cannot save the design due to an invalid path or URL"}, []string{"Confirm the correct path / URL to the design"})
}

func ErrSaveApplication(err error) error {
Expand All @@ -432,7 +432,7 @@ func ErrFetchApplication(err error) error {
}

func ErrDeleteApplication(err error) error {
return errors.New(ErrDeleteApplicationCode, errors.Alert, []string{"Error failed to delete application"}, []string{err.Error()}, []string{"Application might already have been deleted", "You might not have enough permissions to perform the operation.", }, []string{"Check the owner of the application."})
return errors.New(ErrDeleteApplicationCode, errors.Alert, []string{"Error failed to delete application"}, []string{err.Error()}, []string{"Application might already have been deleted", "You might not have enough permissions to perform the operation."}, []string{"Check the owner of the application."})
}

func ErrGetPattern(err error) error {
Expand Down Expand Up @@ -520,11 +520,11 @@ func ErrGetEvents(err error) error {
}

func ErrUpdateEvent(err error, id string) error {
return errors.New(ErrUpdateEventCode, errors.Alert, []string{fmt.Sprintf("Could not update event status for %s", id)}, []string{err.Error()}, []string{"Provided event status not supported", "Event has been deleted or does not exist", "Database is corrupt."}, []string{"Verify event filter settings","Reset database."})
return errors.New(ErrUpdateEventCode, errors.Alert, []string{fmt.Sprintf("Could not update event status for %s", id)}, []string{err.Error()}, []string{"Provided event status not supported", "Event has been deleted or does not exist", "Database is corrupt."}, []string{"Verify event filter settings", "Reset database."})
}

func ErrDeleteEvent(err error, id string) error {
return errors.New(ErrDeleteEventCode, errors.Alert, []string{fmt.Sprintf("Could not delete event %s", id)}, []string{err.Error()}, []string{"Event might have been deleted and doesn't exist", "Database is corrupt."}, []string{"Verify event filter settings","Reset database."})
return errors.New(ErrDeleteEventCode, errors.Alert, []string{fmt.Sprintf("Could not delete event %s", id)}, []string{err.Error()}, []string{"Event might have been deleted and doesn't exist", "Database is corrupt."}, []string{"Verify event filter settings", "Reset database."})
}

func ErrUnsupportedEventStatus(err error, status string) error {
Expand Down

0 comments on commit 1906ae4

Please sign in to comment.