Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NonCriticalErrors = []int32{http.StatusForbidden}
NonCriticalErrors is an array of error statuses, that are non-critical. That means, that this error can be silenced and displayed to the user as a warning on the frontend side.
Functions ¶
func AppendError ¶
AppendError handles single error, that occurred during API GET call. If it is not critical, then it will be returned as a part of error array. Otherwise, it will be returned as a second value. Usage of this functions allows to distinguish critical errors from non-critical ones. It is needed to handle them in a different way.
func HandleError ¶
HandleError handles single error, that occurred during API GET call. If it is not critical, then it will be returned as a part of error array. Otherwise, it will be returned as a second value. Usage of this functions allows to distinguish critical errors from non-critical ones. It is needed to handle them in a different way.
func LocalizeError ¶
LocalizeError returns error code (string) that can be used by frontend to localize error message.
func MergeErrors ¶
MergeErrors merges multiple non-critical error arrays into one array.
Types ¶
This section is empty.