Skip to content

Commit

Permalink
Merge pull request Azure-Samples#10 from jamiewilbraham/master
Browse files Browse the repository at this point in the history
tweak to exception
  • Loading branch information
Teodelas authored Jan 7, 2021
2 parents 82fcc1e + 74911da commit f35e587
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@ public GeofenceController( IAzureMapsApiService azureMapsApiService)
[HttpGet]
public async Task<ActionResult<UploadGeofenceModel>> GetGeofence()
{
try
{
return Ok(await _azureMapsApiService.GetGeofence());
}
catch (GeofenceNotFoundException)
{
return Accepted();
}
return Ok(await _azureMapsApiService.GetGeofence());
}

[HttpPost]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private async Task<GeofenceResourceLocationResponseModel> UploadGeofence(UploadG
}
tries++;
}
throw new Exception("Can't upload geofence.");
throw new Exception("Can't upload geofence, unable to get the udid from service.");
}

private async Task<UploadGeofenceStatusResponseModel> GetUploadGeofenceStatus(string uploadStatusUri)
Expand Down

0 comments on commit f35e587

Please sign in to comment.