package
2.7.0+incompatible
Repository: https://github.com/kubernetes/dashboard.git
Documentation: pkg.go.dev

# Functions

AppendError handles single error, that occurred during API GET call.
HandleError handles single error, that occurred during API GET call.
HandleHTTPError is used to handle HTTP Errors more accurately based on the localized consts.
HandleInternalError writes the given error to the response and sets appropriate HTTP status headers.
IsAlreadyExists determines if the err is an error which indicates that a specified resource already exists.
IsForbiddenError returns true if given error has code 403, false otherwise.
IsNotFoundError returns true when the given error is 404-NotFound error.
IsTokenExpired determines if the err is an error which errStatus' message is MsgTokenExpiredError.
IsTokenExpiredError determines if the err is the MsgTokenExpiredError.
IsUnauthorized determines if err is an error which indicates that the request is unauthorized and requires authentication by the user.
LocalizeError returns error code (string) that can be used by frontend to localize error message.
MergeErrors merges multiple non-critical error arrays into one array.
NewBadRequest creates an error that indicates that the request is invalid and can not be processed.
NewGenericResponse return a statusError which is an error intended for consumption by a REST API server; it can also be reconstructed by clients from a REST response.
NewInternal return a statusError which is an error intended for consumption by a REST API server; it can also be reconstructed by clients from a REST response.
NewInvalid return a statusError which is an error intended for consumption by a REST API server; it can also be reconstructed by clients from a REST response.
NewNotFound return a statusError which is an error intended for consumption by a REST API server; it can also be reconstructed by clients from a REST response.
NewTokenExpired return a statusError which is an error intended for consumption by a REST API server; it can also be reconstructed by clients from a REST response.
NewUnauthorized returns an error indicating the client is not authorized to perform the requested action.
NewUnexpectedObject return a statusError which is an error intended for consumption by a REST API server; it can also be reconstructed by clients from a REST response.

# Constants

Errors that can be used directly without localizing.
Errors that can be used directly without localizing.
Errors that can be used directly without localizing.
Errors that can be used directly without localizing.
Errors that can be used directly without localizing.
Errors that can be used directly without localizing.

# Variables

NonCriticalErrors is an array of error statuses, that are non-critical.