Skip to content

Commit

Permalink
improve API error message clarity #256
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Jan 16, 2023
1 parent f7e8bb8 commit dceaaa0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
8 changes: 6 additions & 2 deletions api.md → API.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

# `REST`ful `API` Integration
# `REST`ful `API` Integration

</div>

Expand Down Expand Up @@ -829,4 +829,8 @@ as development continues.
So if you're reading this, it's because that's all we currently have!

If you found it interesting,
please let us know by starring the repo on GitHub! ⭐
please let us know by starring the repo on GitHub! ⭐

<br />

[![HitCount](https://hits.dwyl.com/dwyl/app-mvp-api.svg)](https://hits.dwyl.com/dwyl/app-mvp)
9 changes: 5 additions & 4 deletions BUILDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ We suggest keeping two terminal tabs/windows running
one for the server `mix phx.server` and the other for the tests.
That way you can also see the UI as you progress.

We have created a *separate*
document detailing the implementation of the API.
You can find it in [`api.md`](./api.md).
We created a *separate*
document detailing the implementation of the `API`.
Please see:
[`api.md`](./api.md).

With that in place, let's get building!

Expand Down Expand Up @@ -105,7 +106,7 @@ With that in place, let's get building!
- [13.1 Setting up](#131-setting-up)
- [13.2 Changing database transactions on `item` insert and update](#132-changing-database-transactions-on-item-insert-and-update)
- [13.3 Fixing tests](#133-fixing-tests)
- [13.4 Checking the changes using `DBEaver`](#134-checking-the-changes-using-DBEaver)
- [13.4 Checking the changes using `DBEaver`](#134-checking-the-changes-using-dbeaver)
- [14. Adding a dashboard to track metrics](#14-adding-a-dashboard-to-track-metrics)
- [14.1 Adding new `LiveView` page in `/stats`](#141-adding-new-liveview-page-in-stats)
- [14.2 Fetching counter of timers and items for each person](#142-fetching-counter-of-timers-and-items-for-each-person)
Expand Down
2 changes: 1 addition & 1 deletion lib/api/item.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule API.Item do
:error ->
errors = %{
code: 400,
message: "The \'id\' is not an integer."
message: "Item \'id\' should be an integer."
}

json(conn |> put_status(400), errors)
Expand Down

0 comments on commit dceaaa0

Please sign in to comment.