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

fix: request to preview gives 500 error for old/new webdav if file is in processing #7507

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

saw-jan
Copy link
Member

@saw-jan saw-jan commented Oct 17, 2023

Description

Fix the status code and message when a thumbnail request is made too early.

For old/new/spaces endpoints.

Current:

< HTTP/1.1 500 Internal Server Error
< 
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
  <s:exception></s:exception>
  <s:message>
    {&#34;id&#34;:&#34;com.owncloud.api.thumbnails&#34;,&#34;code&#34;:425,&#34;detail&#34;:&#34;File Processing&#34;,&#34;status&#34;:&#34;Too Early&#34;}
  </s:message>
</d:error>

With Fix:

< HTTP/1.1 425 Too Early
< 
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
  <s:exception></s:exception>
  <s:message>File Processing</s:message>
</d:error>

Related Issue

How Has This Been Tested?

  • test environment: local

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@owncloud owncloud deleted a comment from update-docs bot Oct 17, 2023
@saw-jan saw-jan marked this pull request as ready for review October 17, 2023 08:00
@saw-jan saw-jan self-assigned this Oct 17, 2023
Copy link
Collaborator

@kobergj kobergj left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@micbar
Copy link
Contributor

micbar commented Oct 17, 2023

@saw-jan
Changelog pipeline failing file ../changelog/unreleased/fix-too-early-preview-request.md: title is too long

@saw-jan
Copy link
Member Author

saw-jan commented Oct 17, 2023

@saw-jan Changelog pipeline failing file ../changelog/unreleased/fix-too-early-preview-request.md: title is too long

Thanks, I reduced the sentence. should work now

@sonarcloud
Copy link

sonarcloud bot commented Oct 17, 2023

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
100.0% 100.0% Duplication

@saw-jan saw-jan merged commit c0594d6 into master Oct 17, 2023
3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/issue-7502 branch October 17, 2023 09:08
ownclouders pushed a commit that referenced this pull request Oct 17, 2023
… in processing (#7507)

* fix: request to preview gives 500 error for old/new webdav if file is in processing

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