owncloud / testing

🔧 app for testing ownCloud
GNU Affero General Public License v3.0
3 stars 4 forks source link

Improve the message when the share expiration date update fails #200

Closed phil-davis closed 2 years ago

phil-davis commented 2 years ago

Description

If "expire share" fails, then the caller of the testing API currently gets a message: Share expire failed

which is not very helpful.

Also send the message that goes with the exception that happened in the API response.

I am working on a PR that changes some sharing behavior, and noticed that it will be nice to have this improvement.

Now I get a response body like:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>400</statuscode>
  <message>Share expire failed: Cannot set the requested share permissions for textfile0.txt</message>
  </meta>
  <data/>
</ocs>

which gives a better clue about what might be going wrong.

Checklist:

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication