diff options
Diffstat (limited to 'syncapi/sync/requestpool.go')
-rw-r--r-- | syncapi/sync/requestpool.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/syncapi/sync/requestpool.go b/syncapi/sync/requestpool.go index a4573610..ca35951a 100644 --- a/syncapi/sync/requestpool.go +++ b/syncapi/sync/requestpool.go @@ -140,6 +140,12 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *userapi. // Extract values from request syncReq, err := newSyncRequest(req, *device, rp.db) if err != nil { + if err == types.ErrMalformedSyncToken { + return util.JSONResponse{ + Code: http.StatusBadRequest, + JSON: jsonerror.InvalidArgumentValue(err.Error()), + } + } return util.JSONResponse{ Code: http.StatusBadRequest, JSON: jsonerror.Unknown(err.Error()), |