// GetAndroidError show error counts of Android notification.
423640
func (s *Storage) GetAndroidError() int64 {
	count := atomic.LoadInt64(&s.stat.Android.PushError)

	return count
}
888588
func (api objectAPIHandlers) GetBucketNotificationHandler(w http.ResponseWriter, r *http.Request) {
	ctx := newContext(r, w, "GetBucketNotification")

	defer logger.AuditLog(w, r, "GetBucketNotification", mustGetClaimsFromToken(r))

	vars := mux.Vars(r)
	bucketName := vars["bucket"]

	objAPI := api.ObjectAPI()
	if objAPI == nil {
		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrServerNotInitialized), r.URL, guessIsBrowserReq(r))
		return
	}

	if !objAPI.IsNotificationSupported() {
		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrNotImplemented), r.URL, guessIsBrowserReq(r))
		return
	}

	if s3Error := checkRequestAuthType(ctx, r, policy.GetBucketNotificationAction, bucketName, ""); s3Error != ErrNone {
		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(s3Error), r.URL, guessIsBrowserReq(r))
		return
	}

	_, err := objAPI.GetBucketInfo(ctx, bucketName)
	if err != nil {
		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r))
		return
	}

	// Attempt to successfully load notification config.
	nConfig, err := readNotificationConfig(ctx, objAPI, bucketName)
	if err != nil {
		// Ignore errNoSuchNotifications to comply with AWS S3.
		if err != errNoSuchNotifications {
			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r))
			return
		}

		nConfig = &event.Config{}
	}

	// If xml namespace is empty, set a default value before returning.
	if nConfig.XMLNS == "" {
		nConfig.XMLNS = "http://s3.amazonaws.com/doc/2006-03-01/"
	}

	notificationBytes, err := xml.Marshal(nConfig)
	if err != nil {
		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r))
		return
	}

	writeSuccessResponseXML(w, notificationBytes)
}
96185
func (api *Client) GetError(id string) (*Error, error) {
	result, _, err := api.makeRequest(http.MethodGet, fmt.Sprintf("%s/%s", api.concatUserPath(errorsPath), id), &Error{})
	if err != nil {
		return nil, err
	}
	return result.(*Error), nil
}
569266
func (r *DateRule) RangeError(message string) *DateRule {
	r.rangeMessage = message
	return r
}
1249702
func (s *Storage) AddAndroidError(count int64) {
	atomic.AddInt64(&s.stat.Android.PushError, count)
}
322696
func IsNeverConnectedError(err error) bool {
	_, ok := errors.Cause(err).(NeverConnectedError)
	return ok
}
212792
func (c *StatsConnection) GetErrorStats(names ...string) (*api.ErrorStats, error) {
	var patterns []string
	if len(names) > 0 {
		patterns = make([]string, len(names))
		for i, name := range names {
			patterns[i] = CounterStatsPrefix + name
		}
	} else {
		// retrieve all error counters by default
		patterns = []string{CounterStatsPrefix}
	}
	stats, err := c.statsClient.DumpStats(patterns...)
	if err != nil {
		return nil, err
	}

	var errorStats = &api.ErrorStats{}

	for _, stat := range stats {
		statName := strings.TrimPrefix(stat.Name, CounterStatsPrefix)

		/* TODO: deal with stats that contain '/' in node/counter name
		parts := strings.Split(statName, "/")
		var nodeName, counterName string
		switch len(parts) {
		case 2:
			nodeName = parts[0]
			counterName = parts[1]
		case 3:
			nodeName = parts[0] + parts[1]
			counterName = parts[2]
		}*/

		errorStats.Errors = append(errorStats.Errors, api.ErrorCounter{
			CounterName: statName,
			Value:       errorStatToUint64(stat.Data),
		})
	}

	return errorStats, nil
}
476438
func (r Response) IsUserError() bool {
	return r.Err != nil && isUserError(r.Err)
}
708207
func (s *Storage) AddAndroidSuccess(count int64) {
	atomic.AddInt64(&s.stat.Android.PushSuccess, count)
}
488849
func (a *App) RunAndExitOnError() {
	if err := a.Run(os.Args); err != nil {
		os.Stderr.WriteString(fmt.Sprintln(err))
		os.Exit(1)
	}
}
819250
func (r Notification_User_Subscriber_Mobile) GetNotification() (resp datatypes.Notification, err error) {
	err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getNotification", nil, &r.Options, &resp)
	return
}
609140
func (env *Environment) RespondAndExitIfError(err error) {
	if err != nil {
		env.Response.Errors = append(env.Response.Errors, err.Error())
		env.RespondAndExit()
	}
}
1082151
func (s *Storage) GetAndroidError() int64 {
	var count int64
	s.getBuntDB(storage.AndroidErrorKey, &count)

	return count
}
968326
func (self *Notifications) Get(request *gottp.Request) {
	var args struct {
		Organization string `json:"org"`
		AppName      string `json:"app_name"`
		User         string `json:"user" required:"true"`
	}

	request.ConvertArguments(&args)
	paginator := request.GetPaginator()

	all, err := sentApi.GetAll(paginator, args.User, args.AppName, args.Organization)

	if err != nil {
		if err != mgo.ErrNotFound {
			log.Println(err)
			request.Raise(gottp.HttpError{
				http.StatusInternalServerError,
				"Unable to fetch data, Please try again later.",
			})

		} else {
			request.Raise(gottp.HttpError{
				http.StatusNotFound,
				"Not Found.",
			})
		}
		return
	}

	request.Write(all)
	return
}
974867
func (s *Storage) GetAndroidError() int64 {
	var count int64
	s.getBoltDB(storage.AndroidErrorKey, &count)

	return count
}
216613
func (h *ErrorVector) GetError(mode int) error {
	if len(h.errors) == 0 {
		return nil
	}

	return h.GetErrorList(mode)
}
1184880
func (it *Iterator) GetError() error {
	var errStr *C.char
	C.leveldb_iter_get_error(it.Iter, &errStr)
	if errStr != nil {
		gs := C.GoString(errStr)
		C.leveldb_free(unsafe.Pointer(errStr))
		return IteratorError(gs)
	}
	return nil
}