Auth: Duplicate API Key Name Handle With Useful HTTP Code (#17905)
* API: Duplicate API Key Name Handle With Useful HTTP Code
* 17447: make changes requested during review
- use dialect.IsUniqueContraintViolation
- change if statement to match others
- return error properly
* Revert "17447: make changes requested during review"
This reverts commit a4a674ea83.
* API: useful http code on duplicate api key error w/ tests
* API: API Key Duplicate Handling
fixed small typo associated with error
This commit is contained in:
committed by
Sofia Papagiannaki
parent
04e7970375
commit
3680b95b44
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
var ErrInvalidApiKey = errors.New("Invalid API Key")
|
||||
var ErrInvalidApiKeyExpiration = errors.New("Negative value for SecondsToLive")
|
||||
var ErrDuplicateApiKey = errors.New("API Key Organization ID And Name Must Be Unique")
|
||||
|
||||
type ApiKey struct {
|
||||
Id int64
|
||||
|
||||
Reference in New Issue
Block a user