Skip to content

Conversation

@nickvergessen
Copy link
Contributor

Current response on webdav requests:

<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:o="http://owncloud.org/ns">
  <s:exception>OCA\DAV\Connector\Sabre\Exception\Forbidden</s:exception>
  <s:message>Access to this resource has been forbidden by law.</s:message>
  <o:retry xmlns:o="o:">true</o:retry>
  <o:reason xmlns:o="o:">Access to this resource has been forbidden by law.</o:reason>
</d:error>

@DeepDiver1975 @icewind1991
Required for FW storage wrapper.

Currently reason === exception message, not sure if we want to keep it like that, but for now that should be fine so we can continue the actual work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this DAVForbiddenException everywhere to avoid confusion ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really sure it helps a lot. DAV could still be the app or sabre...

@PVince81
Copy link
Contributor

Code looks good otherwise 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like the perfect use case for HTTP 451: Unavailable For Legal Reasons 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to overload - base already implements this as 403

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I didn't extend in the beginning, so this was just a left over. will fix in a minute

@icewind1991
Copy link
Contributor

👍 looks good

@DeepDiver1975
Copy link
Member

I'm missing tests 👿

@nickvergessen nickvergessen force-pushed the storage-forbidden-exception branch from 4b2a8db to 0ab8a4c Compare November 16, 2015 15:27
@nickvergessen nickvergessen force-pushed the storage-forbidden-exception branch from 0ab8a4c to e2cfcd9 Compare November 17, 2015 09:40
@nickvergessen
Copy link
Contributor Author

@DeepDiver1975 added some tests to the dav stuff to test exception convertion and exception serialization

DeepDiver1975 added a commit that referenced this pull request Nov 18, 2015
Allow storage wrappers to through a forbidden exception with retry information for clients
@DeepDiver1975 DeepDiver1975 merged commit aba1199 into master Nov 18, 2015
@DeepDiver1975 DeepDiver1975 deleted the storage-forbidden-exception branch November 18, 2015 08:13
@lock lock bot locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants