Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/constants/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const (
NoPermissionToUpdateApplication = "you do not have permission to update the application"
FailedToUpdateApplication = "failed to update application"
ApplicationNotFound = "Application not found"
ErrMissingAIFeatureLicense = "User does not have the required license for AI-assisted functionality."

// asca Engine
FileExtensionIsRequired = "file must have an extension"

// Realtime
Expand Down
2 changes: 1 addition & 1 deletion internal/services/realtimeengine/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func EnsureLicense(jwtWrapper wrappers.JWTWrapper) error {
if aiAllowed || assistAllowed {
return nil
}
return errors.Wrap(err, errorconstants.NoASCALicense)
return errors.New(errorconstants.ErrMissingAIFeatureLicense)
}

// ValidateFilePath validates that the file path exists and is accessible.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (o *OssRealtimeService) RunOssRealtimeScan(filePath, ignoredFilePath string
}

if err := realtimeengine.EnsureLicense(o.JwtWrapper); err != nil {
return nil, errorconstants.NewRealtimeEngineError("failed to ensure license").Error()
return nil, errorconstants.NewRealtimeEngineError(err.Error()).Error()
}

if err := realtimeengine.ValidateFilePath(filePath); err != nil {
Expand Down
Loading