github.com/braveheart12/just@v0.8.7/core/errors.go (about)

     1  /*
     2   *    Copyright 2019 Insolar Technologies
     3   *
     4   *    Licensed under the Apache License, Version 2.0 (the "License");
     5   *    you may not use this file except in compliance with the License.
     6   *    You may obtain a copy of the License at
     7   *
     8   *        http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   *    Unless required by applicable law or agreed to in writing, software
    11   *    distributed under the License is distributed on an "AS IS" BASIS,
    12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   *    See the License for the specific language governing permissions and
    14   *    limitations under the License.
    15   */
    16  
    17  package core
    18  
    19  import "github.com/pkg/errors"
    20  
    21  var (
    22  	// ErrUnknown is returned when error type cannot be defined.
    23  	ErrUnknown = errors.New("unknown error")
    24  	// ErrDeactivated is returned when requested object is deactivated.
    25  	ErrDeactivated = errors.New("object is deactivated")
    26  	// ErrStateNotAvailable is returned when requested object is deactivated.
    27  	ErrStateNotAvailable = errors.New("object state is not available")
    28  	// ErrHotDataTimeout is returned when no hot data received for a specific jet
    29  	ErrHotDataTimeout = errors.New("requests were abandoned due to hot-data timeout")
    30  	// ErrNoPendingRequest is returned when there are no pending requests on current LME
    31  	ErrNoPendingRequest = errors.New("no pending requests are available")
    32  	// ErrNotFound is returned when something not found
    33  	ErrNotFound = errors.New("not found")
    34  	// ErrTooManyPendingRequests is returned when a limit of pending requests has been reached on a current LME
    35  	ErrTooManyPendingRequests = errors.New("the limit of pending requests count has been reached")
    36  	// ErrNoNodes is returned if no matching nodes found
    37  	ErrNoNodes = errors.New("no matching nodes")
    38  )