-
Notifications
You must be signed in to change notification settings - Fork 25
How to catch error or show status #3
Comments
I am here to provide support with the library, not curl.
|
I mean is how to show error in this library, i can't see error when use lib and i don't know why it happen. if (isset($resp['async_job_id'])) {
$check = new CheckJobStatus();
do {
echo 'Not saved yet - waiting for 3 seconds before checking for the job status' . PHP_EOL;
sleep(3); //Wait a bit
$r = json_decode($check->raw($resp['async_job_id'])->getBody()->getContents(), true);
} while (isset($r['.tag']) && $r['.tag'] == 'in_progress');
echo 'URL saved';
} else {
echo 'URL saved';
} that is my mean, i not good about type but i has find in example in this lib to show error, and i have stuck. |
Read the Dropbox API docs about why this is needed. If there was an actual error an exception would be thrown. |
in this document
https://www.dropbox.com/developers/documentation/http/documentation#files-save_url-check_job_status
by using curl we can have see error in command
and now we see error in command
Error in call to API function "files/save_url": request body: could not decode input as JSON
and how to see in browser
I was set ini_set('display_errors', 1);
The text was updated successfully, but these errors were encountered: