404 HTTP Request

I’m using HTTP Requests and Im connecting to an API. If the user is not found using the API, it returns 404. How can I detect if an HTTP Request returns 404?

1 Like

You can use LogService to detect that.

How do I use it? I’m not understanding it.

Actually, this would fit better for your case.
https://developer.roblox.com/en-us/api-reference/event/ScriptContext/Error

EDIT
For messages sent to the console, use LogService instead.
ScriptContext.Error is used for errors in scripts.

Also, here’s an example: Log method for LogService

It would depend if OP is using RequestAsync or GetAsync, only RequestAsync has this.