Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiHelper.ExecuteCallGuardedAsync cannot catch exception #81

Closed
xlogex opened this issue Jan 14, 2022 · 4 comments · Fixed by fullstackhero/dotnet-starter-kit#375 or #84
Closed

Comments

@xlogex
Copy link
Contributor

xlogex commented Jan 14, 2022

Cannot show snackbar message

@xlogex
Copy link
Contributor Author

xlogex commented Jan 14, 2022

image

@xlogex
Copy link
Contributor Author

xlogex commented Jan 14, 2022

image
it seems that the exception thrown cannot deserialize it as a (ApiException ex) because message retrieved i too verbose and no-json

'The HTTP status code of the response was not expected (401).\n\nStatus: 401\nResponse: \n{"messages":["Authentication Failed."],"source":"FSH.WebApi.Infrastructure.Identity.TokenService+d__7","exception":"Authentication Failed.","errorId":"d84a82fa-28e2-40c2-ad19-8bdf30fcb6bd","supportMessage":"Provide the ErrorId to the support team for further analysis.","statusCode":401}'

@xlogex
Copy link
Contributor Author

xlogex commented Jan 14, 2022

solution:
image

xlogex referenced this issue in xlogex/blazor-wasm-boilerplate-1 Jan 14, 2022
@fretje
Copy link
Contributor

fretje commented Jan 14, 2022

This is a problem with the server side rather than the client side... when/how exactly do you get there?

This should get catched by the ApiException<ErrorResult> block... if it's not then that is the problem needed to be fixed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants