Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
dennis s.23
9 years agoNew member | Level 1
How to I determine LookupError.NotFound from AggregateException
How to I determine LookupError.NotFound from AggregateException
Here is code:
try{
pFilesRoutes.GetMetadataAsync("/shesnotthere", false)
}catch(AggregateException e)
{
foreach (var err in...
Greg-DB
Dropbox Community Moderator
9 years agoHere's a small sample of how you can explicitly check for an error like NotFound:
try {
var metadata = await this.client.Files.GetMetadataAsync("/non-existant path");
Console.WriteLine(metadata.Name);
} catch (Dropbox.Api.ApiException<Dropbox.Api.Files.GetMetadataError> e) {
if (e.ErrorResponse.IsPath) {
var pathError = e.ErrorResponse.AsPath.Value;
if (pathError.IsNotFound) {
Console.WriteLine ("File or folder not found.");
} else {
Console.WriteLine (pathError);
}
} else {
Console.WriteLine (e.ErrorResponse);
}
}
Hope this helps!
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!