func NewEntryNotFoundError() *primitives.JSONError { return primitives.NewJSONError(-32009, "Entry not found", nil) }
func NewInternalDatabaseError() *primitives.JSONError { return primitives.NewJSONError(-32603, "Internal error", "database error") }
//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) }
func NewInvalidCommitEntryError() *primitives.JSONError { return primitives.NewJSONError(-32602, "Invalid params", "Invalid Commit Entry") }
func NewInvalidDataPassedError() *primitives.JSONError { return primitives.NewJSONError(-32602, "Invalid params", "Invalid data passed") }
func NewInvalidRequestError() *primitives.JSONError { return primitives.NewJSONError(-32600, "Invalid Request", nil) }
func NewInvalidHashError() *primitives.JSONError { return primitives.NewJSONError(-32602, "Invalid params", "Invalid Hash") }
func NewInvalidAddressError() *primitives.JSONError { return primitives.NewJSONError(-32602, "Invalid params", "Invalid Address") }
func NewUnableToDecodeTransactionError() *primitives.JSONError { return primitives.NewJSONError(-32602, "Invalid params", "Unable to decode the transaction") }
func NewCustomInternalError(data interface{}) *primitives.JSONError { return primitives.NewJSONError(-32603, "Internal error", data) }
func NewCustomInvalidParamsError(data interface{}) *primitives.JSONError { return primitives.NewJSONError(-32602, "Invalid params", data) }
func NewInternalError() *primitives.JSONError { return primitives.NewJSONError(-32603, "Internal error", nil) }
func NewInvalidParamsError() *primitives.JSONError { return primitives.NewJSONError(-32602, "Invalid params", nil) }
func NewMethodNotFoundError() *primitives.JSONError { return primitives.NewJSONError(-32601, "Method not found", nil) }
func NewMissingChainHeadError() *primitives.JSONError { return primitives.NewJSONError(-32009, "Missing Chain Head", nil) }
func NewInvalidTransactionError() *primitives.JSONError { return primitives.NewJSONError(-32602, "Invalid params", "Invalid Transaction") }
func NewReceiptError() *primitives.JSONError { return primitives.NewJSONError(-32010, "Receipt creation error", nil) }
func NewParseError() *primitives.JSONError { return primitives.NewJSONError(-32700, "Parse error", nil) }