diff --git a/server/src/routes/posts.ts b/server/src/routes/posts.ts index 8c324c8e..c55f97d8 100644 --- a/server/src/routes/posts.ts +++ b/server/src/routes/posts.ts @@ -98,7 +98,7 @@ posts.post( res.json(newPost) } catch (e) { - next(e) + res.status(400).json(e) } } ) @@ -274,7 +274,7 @@ posts.get( res.json(post) } } catch (e) { - next(e) + res.status(400).json(e) } } )