# README
Ralali Go Error Wapped
We have wrapped the go error interface to make debugging easy and have standary error response through out all golang micro services.
This also support on-demand stack trace of error. To get the stack_trace of the error you need to pass "debug" key in context of the error.
You can also change the stack trace depth by passing the trace_depth in context with you desired depth value.
In rl-go-microservice all the API endpoint will pass there two keys in context if that exists in API Header.
Sample Header
Sample Response
# Functions
No description provided by the author
No description provided by the author
As will check given error is of rError type.
BadReqError : error occured while validating requestlike while typecasting request, fk in request dosn't exists.
ConnError : error occured while creating connection.
CreateError : error occured while creating table.
CustomError : custom error.
DeleteError : error occured while delete query.
No description provided by the author
DropError : error occured while drop query.
ExecError : error occured while exec query.
ForbiddenErr : forbidden access.
GetStackTrace : Get function name, file name and line no of the caller functionDepth is the value from which it will start searching in the stack.
InsertError : error occured while insert query.
MiscError : error occured while processing.
No description provided by the author
IsDebug will check debug send in context.
MarshalError : error occured while unmarshal.
MaxAttemptReachedErr : max retry attempt reached.
MiscError : error occured while processing.
NeedWrap will check error is not nil and not of rError typei.e it need to wrap with rError.
No description provided by the author
NotFoundError : error occured when id not found.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RateLimitExceedErr : service limit exceeded.
No description provided by the author
SelectError : error occured while select query.
SelectIgnoreNoRow : error occured while select query by ignoring no row error.
TokenExpiredErr : token or otp expired.
TxError : error occured while starting transaction.
UnauthoriseErr : unauthorized access.
UnmarshalError : error occured while unmarshal.
UpdateError : error occured while update query.
No description provided by the author
# Constants
error code.
msg constant.
error code.
msg constant.
error code.
msg constant.
error code.
error code.
error code.
error code.
No description provided by the author
error code.
error code.
error code.
error code.
error code.
msg constant.
error code.
error code.
msg constant.
msg constant.
error code.
error code.
error code.
error code.
error code.
msg constant.
error code.
msg constant.
error code.
msg constant.
msg constant.
error code.
msg constant.
error code.
error code.
msg constant.
error code.
msg constant.
error code.
msg constant.
error code.
error code.
msg constant.
error code.
msg constant.
No description provided by the author
error code.
msg constant.
error code.
error code.
msg constant.
error code.
error code.
error code.
msg constant.
# Structs
Error model consists of code i.e unique code either entered manually or table primary key msg i.e.
StackTrace model.