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: bulky error message for invalid search request #8444

Merged
merged 1 commit into from Feb 13, 2024

Conversation

saw-jan
Copy link
Member

@saw-jan saw-jan commented Feb 13, 2024

Description

Fixed the error message returned by the invalid search request. now, the message only includes the necessary info

Current:

<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
    <s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
    <!-- BAD -->
    <s:message>
        {&#34;id&#34;:&#34;com.owncloud.api.search&#34;,&#34;code&#34;:400,&#34;detail&#34;:&#34;error: bad request: the expression can&#39;t begin from a binary operator: &#39;AND&#39;&#34;,&#34;status&#34;:&#34;Bad Request&#34;}
    </s:message>
</d:error>

With Fix:

<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
    <s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
    <!-- FIXED -->
    <s:message>
        error: bad request: the expression can&#39;t begin from a binary operator: &#39;AND&#39;
    </s:message>
</d:error>

Related Issue

Motivation and Context

How Has This Been Tested?

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:

@saw-jan saw-jan self-assigned this Feb 13, 2024
Copy link

sonarcloud bot commented Feb 13, 2024

@saw-jan saw-jan merged commit 911754f into master Feb 13, 2024
3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/search-error-message-8442 branch February 13, 2024 10:13
@micbar micbar mentioned this pull request Feb 26, 2024
71 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bulky error message for invalid search pattern
2 participants