aboutsummaryrefslogtreecommitdiff
path: root/errors/errors.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-10-09 21:07:20 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-10-09 21:07:20 +0530
commit1924bfca2439829253df3598481034e5c586e3e2 (patch)
tree6b82a091ae97e1980fe0ff3f3fb3eaa726a6d6ad /errors/errors.go
parentb643f7852f93f73843aa5f52f9b4545321713e10 (diff)
added route to add items to invoicev0.0.12
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")
)