mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 23:23:10 +08:00
Return plugin error when requesting settings (#86052)
This commit is contained in:

committed by
GitHub

parent
8373fc3544
commit
eac02a61e1
@ -296,6 +296,23 @@ func (e *Error) WithMessage(m string) *Error {
|
||||
return e
|
||||
}
|
||||
|
||||
func (e Error) PublicMessage() string {
|
||||
switch e.ErrorCode {
|
||||
case errorCodeSignatureInvalid:
|
||||
return "Invalid plugin signature"
|
||||
case errorCodeSignatureModified:
|
||||
return "Plugin signature does not match"
|
||||
case errorCodeSignatureMissing:
|
||||
return "Plugin signature is missing"
|
||||
case ErrorCodeFailedBackendStart:
|
||||
return "Plugin failed to start"
|
||||
case ErrorAngular:
|
||||
return "Angular plugins are not supported"
|
||||
}
|
||||
|
||||
return "Plugin failed to load"
|
||||
}
|
||||
|
||||
// Access-Control related definitions
|
||||
|
||||
// RoleRegistration stores a role and its assignments to basic roles
|
||||
|
Reference in New Issue
Block a user