im working on an app which uses api calls. When im typing the right api keys everything works fine howver if i put wrong details i will get the 401 error
. I know what this error means an im expecting it so i have my own handlers, the problem is the warning which the browser outpus. I've tried to disable every error but then i cant debug the app, Is it possible to disable it from php's config? If yes how?
Thanks
Code:
$apicalldata = file_get_contents("https://api.digitalocean.com/v1/droplets/?client_id=xxx&api_key=xxx");
$call = json_decode($apicalldata);
$status = $call->status;
if ($status != "OK") {
echo "Sorry, the API details are wrong!";
}