-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
How to propagate exceptions after a lock is in place? #38
Comments
Sorry, I'm not really sure what you mean. There are either exceptions handled by ASP.NET Core itself and those handled by the custom
I suggest that you implement your own EDIT: Clarification |
Hi, It's OK. The issue we are facing is that we are throwing an exception in the PutAsync action that is called just after the LockAsync action; but this exception is not catch by the application that interacts with the WebDav, it assumes that the action happened correctly. However, Windows shows us a dialog that looks like this: Any idea of how could we circunvent the windows dialog and catch the exception on the consumer application of the WebDav? Thank you. Kind regards, Rodrigo |
What kind of exception do you get? |
Hi, That's the point. The consumer application of the WebDav is not catching any exception; it continues as if the WebDav has successfully added/copied the file it is sending, however the dialog I copied in my previous message appears due to the exception that is being thrown from the PutAsync. We throw this exception on purpose, and We would like to have it being capture by the consumer application of the WebDav, but so far it has not been possible, and the only thing that tells us that it actually happen (beyond knowing its existence because we code it) is that dialog from the operative system. The exception type We're throwing on purpose from the PutAsync is a Thank you. Kind regards, Rodrigo |
Aha, so it's an |
We tried that, and it didn't work. Our suspicion is that the operative system (Windows) is swallowing the exception and showing the dialog form a previous comment, and that is why the consumer application is not catching it. But it is a suspicion, and would like another opinion, specially from the creator of the library and your experience with the WebDav protocol. |
Hi, Do you have an example on how to wrap an exception within a
Thank you. Kind regards, Rodrigo |
Hi again, Well, I think We found the way to create the This is our custom
This works as expected, however Windows still shows us the same dialog. In any case, thanks for the help. Kind regards, Rodrigo |
Ensures that - in the sample server - all exceptions are returned as multi-status responses. Incorporates the changes from #38. Maybe we need to return the error element too?
The changes you made are also available in the release/2.0 branch, but I used an ExceptionFilterAttribute instead of the IExceptionFilter. I'll leave this ticket open, because maybe we need to return the |
Hi,
We are facing an issue in our project, when We need to throw and exception during a PutAsync action that is called just after the LockAsync action. However, even when the exception is bubbled up and it is a type not handled by the WebDavExceptionFilter, the consumer or client of the WebDav server does not receives the exception. By the way, the UnlockAsync action is always called, regardless the exception we are throwing.
On the other hand, if the exception is throw during the PutAsync action but before the LockAsync, then the consumer receives the exception.
Can you please tell us how could we propagate the the caller or consumer an exception type thrown from an action just after the lock?
Thank you very much in advance.
Regards,
Rodrigo
The text was updated successfully, but these errors were encountered: