Level 30
abort function puts a message to response body, not in status string. Maybe you should write your own helper function for that.
HTTP/2 400
server: openresty
date: Sat, 04 Apr 2026 11:28:22 GMT
content-type: text/html; charset=utf-8
cache-control: no-cache, private
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
phpdebugbar-id: 01KNC40K97P25K2JC4TFG74HMH
access-control-allow-origin: *
Calling abort(400, 'No parameters provided'); gives me the above, is there a way to show my message like when I'm calling response()->setStatusCode(400, 'Empty')?
You can’t HTTP/2 drops custom reason-phrases. abort(400,'…') only puts your message in the body. If you need a label, return it in the body (e.g. json “error”: “…”) or add a custom header.
Please or to participate in this conversation.