Example #1
0
 private async Task DefaultLoadAsync()
 {
     try
     {
         SetGeneralResources(await TrackService.FilterResourceNameAsync(null));
     }
     catch (TokenUnavailableException)
     {
         await(OpenidConnectPkce as TenantOpenidConnectPkce).TenantLoginAsync();
     }
     catch (Exception ex)
     {
         resourceFilterForm.SetError(ex.Message);
     }
 }
Example #2
0
 private async Task OnResourceFilterValidSubmitAsync(EditContext editContext)
 {
     try
     {
         SetGeneralResources(await TrackService.FilterResourceNameAsync(resourceFilterForm.Model.FilterName));
     }
     catch (FoxIDsApiException ex)
     {
         if (ex.StatusCode == System.Net.HttpStatusCode.NotFound)
         {
             resourceFilterForm.SetFieldError(nameof(resourceFilterForm.Model.FilterName), ex.Message);
         }
         else
         {
             throw;
         }
     }
 }