mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +00:00
be more specific about errors
This commit is contained in:
parent
ce944f92f7
commit
05cb97d412
1 changed files with 1 additions and 0 deletions
|
@ -257,6 +257,7 @@ func (a *api) editWatcherHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
switch err {
|
switch err {
|
||||||
case reddit.ErrSubredditIsPrivate, reddit.ErrSubredditIsQuarantined:
|
case reddit.ErrSubredditIsPrivate, reddit.ErrSubredditIsQuarantined:
|
||||||
|
err = fmt.Errorf("error watching %s: %w", lsr, err)
|
||||||
a.errorResponse(w, r, 403, err)
|
a.errorResponse(w, r, 403, err)
|
||||||
default:
|
default:
|
||||||
a.errorResponse(w, r, 422, err)
|
a.errorResponse(w, r, 422, err)
|
||||||
|
|
Loading…
Reference in a new issue