Error

ctx.Error contains the error associated with the current execution. gox.Error.


Property

gox
ctx.Error gox.Error

The value is nil when the Context does not contain an error. The interface exposes the stage, message, original cause and diagnostic data available for the execution.

To know the full statement of the interface and its methods, see the reference to gox.Error.


Check the status

gox
if ctx.HasError() {
    err := ctx.Error
}

HasError() return true when ctx.Error contains a value other than nil.


See also

Next step

Continue with Request for information on the HTTP request.

Request