aboutsummaryrefslogtreecommitdiff
path: root/errors/errors.go
diff options
context:
space:
mode:
Diffstat (limited to 'errors/errors.go')
-rw-r--r--errors/errors.go47
1 files changed, 25 insertions, 22 deletions
diff --git a/errors/errors.go b/errors/errors.go
index 9fed3a3..c16bd52 100644
--- a/errors/errors.go
+++ b/errors/errors.go
@@ -23,35 +23,38 @@ import (
var (
// 204
- ErrEmptyResponse = errors.New("No Records Found")
+ ErrEmptyResponse = errors.New("No Records Found")
// 400
- ErrNoWhereCondition = errors.New("No Where Condition")
- ErrInvalidID = errors.New("Invalid ID")
- ErrEmptyContactName = errors.New("Contact Name Cannot Be Empty")
- ErrInvalidGSTIN = errors.New("Invalid GSTIN")
- ErrInvalidEmail = errors.New("Invalid E-Mail Address")
- ErrInvalidPhone = errors.New("Invalid Phone Number")
- ErrInvalidWebsite = errors.New("Invalid Website URL")
- ErrEmptyBrandName = errors.New("Brand Name Cannot Be Empty")
- ErrInvalidUnitPrice = errors.New("Invalid Unit Price")
- ErrInvalidGSTPercentage = errors.New("Invalid GST Percentage")
- ErrPasswordTooShort = errors.New("Password Is Too Short")
- ErrPasswordTooLong = errors.New("Password Is Too Long")
- ErrInvalidLoginMethod = errors.New("Login Method Can Only Be 'email' Or 'username'")
+ ErrNoWhereCondition = errors.New("No Where Condition")
+ ErrInvalidID = errors.New("Invalid ID")
+ ErrEmptyContactName = errors.New("Contact Name Cannot Be Empty")
+ ErrInvalidGSTIN = errors.New("Invalid GSTIN")
+ ErrInvalidEmail = errors.New("Invalid E-Mail Address")
+ ErrInvalidPhone = errors.New("Invalid Phone Number")
+ ErrInvalidWebsite = errors.New("Invalid Website URL")
+ ErrEmptyBrandName = errors.New("Brand Name Cannot Be Empty")
+ ErrInvalidUnitPrice = errors.New("Invalid Unit Price")
+ ErrInvalidGSTPercentage = errors.New("Invalid GST Percentage")
+ ErrPasswordTooShort = errors.New("Password Is Too Short")
+ ErrPasswordTooLong = errors.New("Password Is Too Long")
+ ErrInvalidLoginMethod = errors.New("Login Method Can Only Be 'email' Or 'username'")
// 401
- ErrWrongPassword = errors.New("Wrong Password")
- ErrInvalidAuthHeader = errors.New("Invalid Authorization Header")
- ErrUnauthorized = errors.New("Unauthorized")
- ErrSessionExpired = errors.New("Session Expired")
+ ErrWrongPassword = errors.New("Wrong Password")
+ ErrInvalidAuthHeader = errors.New("Invalid Authorization Header")
+ ErrUnauthorized = errors.New("Unauthorized")
+ ErrSessionExpired = errors.New("Session Expired")
// 403
- ErrForbidden = errors.New("You Are Not Authorized To Access This Resource")
+ ErrForbidden = errors.New("You Are Not Authorized To Access This Resource")
// 404
- ErrNotFound = errors.New("Not Found")
- ErrBrandNotFound = errors.New("This Brand Does Not Exist")
+ ErrNotFound = errors.New("Not Found")
+ ErrBrandNotFound = errors.New("This Brand Does Not Exist")
+
+ // 405
+ ErrCannotEditInvoice = errors.New("This Invoice Cannot Be Edited Now")
// 409
ErrNonUniqueGSTIN = errors.New("GSTIN Must Be Unique")
@@ -64,5 +67,5 @@ var (
ErrNonUniqueInvoiceNumber = errors.New("Invoice Number Must Be Unique")
// 500
- ErrInternalServerError = errors.New("Internal Server Error")
+ ErrInternalServerError = errors.New("Internal Server Error")
)