Skip to content

Commit

Permalink
pull latest changes
Browse files Browse the repository at this point in the history
Signed-off-by: Eti Ijeoma <ijayeti@gmail.com>
  • Loading branch information
Aijeyomah committed Oct 11, 2024
1 parent f7fa548 commit 598f120
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions internal/errors/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,14 @@ import (
)

var (
<<<<<<< Updated upstream
ErrInvalidChartURICode = "kanvas-snapshot-900"
ErrCreatingMesheryDesignCode = "kanvas-snapshot-901"
ErrGeneratingSnapshotCode = "kanvas-snapshot-902"
ErrHTTPPostRequestCode = "kanvas-snapshot-903"
ErrDecodingAPICode = "kanvas-snapshot-905"
ErrUnexpectedResponseCodeCode = "kanvas-snapshot-906"
ErrRequiredFieldNotProvidedCode = "kanvas-snapshot-907"
=======
ErrInvalidChartURICode = "kanvas-snapshot-900"
ErrCreatingMesheryDesignCode = "kanvas-snapshot-901"
ErrGeneratingSnapshotCode = "kanvas-snapshot-902"
ErrHTTPPostRequestCode = "kanvas-snapshot-903"
ErrDecodingAPICode = "kanvas-snapshot-905"
ErrUnexpectedResponseCodeCode = "kanvas-snapshot-906"
ErrInvalidEmailFormatCode = "kanvas-snapshot-907"
>>>>>>> Stashed changes
ErrInvalidEmailFormatCode = "kanvas-snapshot-908"
)

func ErrInvalidChartURI(err error) error {
Expand Down Expand Up @@ -80,20 +71,11 @@ func ErrUnexpectedResponseCode(statusCode int, body string) error {
)
}

<<<<<<< Updated upstream
func ErrRequiredFieldNotProvided(err error, field string) error {
return errors.New(ErrRequiredFieldNotProvidedCode, errors.Alert,
[]string{"All required flags are not passed."},
[]string{err.Error()},
[]string{"Required flag \"%s\" is not passed."},
[]string{"Ensure value for flag \"%s\" is correctly provided."},
=======
func ErrInvalidEmailFormat(email string) error {
return errors.New(ErrInvalidEmailFormatCode, errors.Alert,
[]string{"Invalid email format provided."},
[]string{fmt.Sprintf("The provided email '%s' is not a valid email format.", email)},
[]string{"The email provided for the Kanvas snapshot request is not in the correct format."},
[]string{"Ensure the email address follows the correct format (e.g., user@example.com)."},
>>>>>>> Stashed changes
)
}

0 comments on commit 598f120

Please sign in to comment.