From ae2360a48074df6501ae2312c83d1fe67c87f6ea Mon Sep 17 00:00:00 2001 From: Adam Townsend Date: Thu, 12 Oct 2023 23:31:15 -0700 Subject: [PATCH] include the proper status code --- app.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.rb b/app.rb index dc43868..aa82f35 100644 --- a/app.rb +++ b/app.rb @@ -47,7 +47,8 @@ class App < Roda r.on "links" do r.post do if 'application/json' != r.headers['CONTENT_TYPE'] - return {message: "Not a valid JSON request"}.to_json + response.status = 400 + return {message: "not a valid json request"}.to_json end url = r.params['url']