From c06a671dc4fe213c0e9f10a99d3c6d82396e91e1 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 10 Sep 2023 14:31:37 +0530 Subject: using better error messages for 409 Conflict --- errors/errors.go | 10 +++++----- main.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/errors/errors.go b/errors/errors.go index b5f4f63..9a5a215 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -55,11 +55,11 @@ var ( // 409 ErrNonUniqueGSTIN = errors.New("GSTIN Must Be Unique") - ErrNonUniquePhone = errors.New("Phone Number Must Be Unique") - ErrNonUniqueEmail = errors.New("Email Address Must Be Unique") - ErrNonUniqueUsername = errors.New("Username Must Be Unique") - ErrNonUniqueWebsite = errors.New("Website Must Be Unique") - ErrNonUniqueBrandName = errors.New("Brand Name Must Be Unique") + ErrNonUniquePhone = errors.New("Phone Number Is Already In Use") + ErrNonUniqueEmail = errors.New("Email Address Is Already In Use") + ErrNonUniqueUsername = errors.New("Username Is Already In Use") + ErrNonUniqueWebsite = errors.New("Website Is Already In Use") + ErrNonUniqueBrandName = errors.New("Brand Name Is Already In Use") ErrNonUniqueBrandItem = errors.New("Item With Same Name And Brand Already Exists") // 500 diff --git a/main.go b/main.go index f750a4b..fb93766 100644 --- a/main.go +++ b/main.go @@ -37,7 +37,7 @@ import ( "log" ) -const OPENBILLS_VERSION = "v0.0.7" +const OPENBILLS_VERSION = "v0.0.8" func init() { if viper.GetBool("production_mode") { -- cgit v1.2.3