Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
Use err instead of error
Browse files Browse the repository at this point in the history
  • Loading branch information
jarifibrahim committed Oct 8, 2018
1 parent 377c80e commit f9be137
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions controller/space.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func (c *SpaceController) Delete(ctx *app.DeleteSpaceContext) error {
if err != nil {
log.Error(ctx, map[string]interface{}{
"space_id": ctx.SpaceID,
"error": err,
"err": err,
}, "could not convert the UUID of type github.com/satori/go.uuid to github.com/goadesign/goa/uuid")
return jsonapi.JSONErrorResponse(
ctx, errors.NewInternalError(ctx, errs.Wrap(err, "could not delete space")),
Expand All @@ -210,7 +210,7 @@ func (c *SpaceController) Delete(ctx *app.DeleteSpaceContext) error {
if err != nil {
log.Error(ctx, map[string]interface{}{
"space_id": spaceID,
"error": err,
"err": err,
}, "could not delete codebases")
return jsonapi.JSONErrorResponse(
ctx, errors.NewInternalError(ctx, errs.Wrapf(err, "failed to delete codebases associated with space %s", spaceID)))
Expand All @@ -223,7 +223,7 @@ func (c *SpaceController) Delete(ctx *app.DeleteSpaceContext) error {
if err != nil {
log.Error(ctx, map[string]interface{}{
"space_id": spaceID,
"error": err,
"err": err,
}, "could not delete OpenShift resources")
return jsonapi.JSONErrorResponse(
ctx, errors.NewInternalError(ctx, errs.Wrapf(
Expand Down Expand Up @@ -285,7 +285,7 @@ func deleteCodebases(
log.Error(ctx, map[string]interface{}{
"space_id": spaceID,
"path": path,
"error": err,
"err": err,
}, "failed to list codebases")
return errs.Wrapf(err, "could not list codebases for space: %s", spaceID)
}
Expand All @@ -295,7 +295,7 @@ func deleteCodebases(
formattedErrors, err := cl.DecodeJSONAPIErrors(resp)
if err != nil {
log.Error(ctx, map[string]interface{}{
"error": err,
"err": err,
"response": resp,
}, "failed to decode JSON formatted errors returned while listing codebases")
return errors.NewInternalError(ctx,
Expand Down

0 comments on commit f9be137

Please sign in to comment.