mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-21 19:37:41 +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 {
|
||||
switch err {
|
||||
case reddit.ErrSubredditIsPrivate, reddit.ErrSubredditIsQuarantined:
|
||||
err = fmt.Errorf("error watching %s: %w", lsr, err)
|
||||
a.errorResponse(w, r, 403, err)
|
||||
default:
|
||||
a.errorResponse(w, r, 422, err)
|
||||
|
|
Loading…
Reference in a new issue