mirror of https://github.com/harness/drone.git
feat:[AH-1011]: Changes for HAR license check (#3520)
* feat:[AH-1011]: fix checks * feat:[AH-1011]: Changes for HAR license checktry-new-ui
parent
0f1e5cda15
commit
660738e8ab
|
@ -87,6 +87,12 @@ func Translate(ctx context.Context, err error) *Error {
|
|||
case errors.As(err, &maxBytesErr):
|
||||
return RequestTooLargef("The request is too large. maximum allowed size is %d bytes", maxBytesErr.Limit)
|
||||
|
||||
case errors.Is(err, store.ErrLicenseExpired):
|
||||
return BadRequestf("license expired.")
|
||||
|
||||
case errors.Is(err, store.ErrLicenseNotFound):
|
||||
return BadRequestf("license not found.")
|
||||
|
||||
// git errors
|
||||
case errors.As(err, &appError):
|
||||
if appError.Err != nil {
|
||||
|
|
|
@ -32,4 +32,6 @@ var (
|
|||
ErrSpaceWithChildsCantBeDeleted = errors.New("the space can't be deleted as it still contains " +
|
||||
"spaces or repos")
|
||||
ErrPreConditionFailed = errors.New("precondition failed")
|
||||
ErrLicenseNotFound = errors.New("license not found")
|
||||
ErrLicenseExpired = errors.New("license expired")
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue