Exemple #1
0
func NewEntryNotFoundError() *primitives.JSONError {
	return primitives.NewJSONError(-32009, "Entry not found", nil)
}
Exemple #2
0
func NewInternalDatabaseError() *primitives.JSONError {
	return primitives.NewJSONError(-32603, "Internal error", "database error")
}
Exemple #3
0
//http://www.jsonrpc.org/specification : -32000 to -32099 error codes are reserved for implementation-defined server-errors.
func NewBlockNotFoundError() *primitives.JSONError {
	return primitives.NewJSONError(-32008, "Block not found", nil)
}
Exemple #4
0
func NewInvalidCommitEntryError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Invalid Commit Entry")
}
Exemple #5
0
func NewInvalidDataPassedError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Invalid data passed")
}
Exemple #6
0
func NewInvalidRequestError() *primitives.JSONError {
	return primitives.NewJSONError(-32600, "Invalid Request", nil)
}
Exemple #7
0
func NewInvalidHashError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Invalid Hash")
}
Exemple #8
0
func NewInvalidAddressError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Invalid Address")
}
Exemple #9
0
func NewUnableToDecodeTransactionError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Unable to decode the transaction")
}
Exemple #10
0
func NewCustomInternalError(data interface{}) *primitives.JSONError {
	return primitives.NewJSONError(-32603, "Internal error", data)
}
Exemple #11
0
func NewCustomInvalidParamsError(data interface{}) *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", data)
}
Exemple #12
0
func NewInternalError() *primitives.JSONError {
	return primitives.NewJSONError(-32603, "Internal error", nil)
}
Exemple #13
0
func NewInvalidParamsError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", nil)
}
Exemple #14
0
func NewMethodNotFoundError() *primitives.JSONError {
	return primitives.NewJSONError(-32601, "Method not found", nil)
}
Exemple #15
0
func NewMissingChainHeadError() *primitives.JSONError {
	return primitives.NewJSONError(-32009, "Missing Chain Head", nil)
}
Exemple #16
0
func NewInvalidTransactionError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Invalid Transaction")
}
Exemple #17
0
func NewReceiptError() *primitives.JSONError {
	return primitives.NewJSONError(-32010, "Receipt creation error", nil)
}
Exemple #18
0
func NewParseError() *primitives.JSONError {
	return primitives.NewJSONError(-32700, "Parse error", nil)
}