Example #1
0
func NewEntryNotFoundError() *primitives.JSONError {
	return primitives.NewJSONError(-32009, "Entry not found", nil)
}
Example #2
0
func NewInternalDatabaseError() *primitives.JSONError {
	return primitives.NewJSONError(-32603, "Internal error", "database error")
}
Example #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)
}
Example #4
0
func NewInvalidCommitEntryError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Invalid Commit Entry")
}
Example #5
0
func NewInvalidDataPassedError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Invalid data passed")
}
Example #6
0
func NewInvalidRequestError() *primitives.JSONError {
	return primitives.NewJSONError(-32600, "Invalid Request", nil)
}
Example #7
0
func NewInvalidHashError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Invalid Hash")
}
Example #8
0
func NewInvalidAddressError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Invalid Address")
}
Example #9
0
func NewUnableToDecodeTransactionError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Unable to decode the transaction")
}
Example #10
0
func NewCustomInternalError(data interface{}) *primitives.JSONError {
	return primitives.NewJSONError(-32603, "Internal error", data)
}
Example #11
0
func NewCustomInvalidParamsError(data interface{}) *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", data)
}
Example #12
0
func NewInternalError() *primitives.JSONError {
	return primitives.NewJSONError(-32603, "Internal error", nil)
}
Example #13
0
func NewInvalidParamsError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", nil)
}
Example #14
0
func NewMethodNotFoundError() *primitives.JSONError {
	return primitives.NewJSONError(-32601, "Method not found", nil)
}
Example #15
0
func NewMissingChainHeadError() *primitives.JSONError {
	return primitives.NewJSONError(-32009, "Missing Chain Head", nil)
}
Example #16
0
func NewInvalidTransactionError() *primitives.JSONError {
	return primitives.NewJSONError(-32602, "Invalid params", "Invalid Transaction")
}
Example #17
0
func NewReceiptError() *primitives.JSONError {
	return primitives.NewJSONError(-32010, "Receipt creation error", nil)
}
Example #18
0
func NewParseError() *primitives.JSONError {
	return primitives.NewJSONError(-32700, "Parse error", nil)
}