File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ Additionaly, some examples with:
5757
5858| Feature | gin | echo | iris | fiber | micro | goa | gorilla |
5959| ----------------------------------------------------| --- | ---- | ---- | ----- | ----- | --- | ------- |
60- | Final Project Structure | ⏳ | ⏳ | ⏳ | ⏳ | ⏳ | ⏳ | ⏳ |
60+ | Final Project Structure | ⏳ | 👷🏼♂️ | ⏳ | ⏳ | ⏳ | ⏳ | ⏳ |
6161| "Hello, World!" and simple JSON response | ⏳ | ✅ | ✅ | ✅ | ⏳ | ⏳ | ⏳ |
6262| CRUD JSON API for [ the example entity] [ folder-pkg ] | ⏳ | ✅ | ✅ | 👷🏼♂️ | ⏳ | ⏳ | ⏳ |
6363| Paging and error handling | ⏳ | ✅ | ✅ | ✅ | ⏳ | ⏳ | ⏳ |
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ func main() {
3535 // c.JSON(pkg.TextResponse{Message: err.Error()})
3636 // return fiber.NewError(fiber.StatusInternalServerError, err.Error())
3737
38+ // TODO: Replace 500 error with 4xx for paging related errors.
3839 errMsg := pkg.TextResponse {Message : err .Error ()}
3940 return c .Status (fiber .StatusInternalServerError ).JSON (errMsg )
4041 }
@@ -47,8 +48,8 @@ func main() {
4748
4849 entity , err := entitiesRepo .Get (entityID )
4950 if err != nil {
50- c . JSON ( pkg.TextResponse {Message : err .Error ()})
51- return fiber .ErrInternalServerError
51+ errMsg := pkg.TextResponse {Message : err .Error ()}
52+ return c . Status ( fiber .StatusInternalServerError ). JSON ( errMsg )
5253 }
5354
5455 if entity == nil {
You can’t perform that action at this time.
0 commit comments