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

Handle the bad request status for the CreateStorageSpace function #6469

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

2403905
Copy link
Contributor

@2403905 2403905 commented Jun 7, 2023

Description

Related Issue

How Has This Been Tested?

  • test environment: local
  • test case 1:
set OCIS_SPACES_MAX_QUOTA=50

curl -XPOST -k -uadmin:admin https://localhost:9200/graph/v1.0/drives -H 'Content-Type: application/json' --data-raw '{"Name": "testQuota", "description": "This is a test quota", "quota": {"total": 51}}' -ik
HTTP/1.1 400 Bad Request
Content-Length: 223
Content-Security-Policy: frame-ancestors 'none'
Content-Type: application/json; charset=utf-8
Date: Wed, 07 Jun 2023 11:49:18 GMT
Vary: Origin
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Graph-Version: 3.0.0+dev

{"error":{"code":"invalidRequest","innererror":{"date":"2023-06-07T11:49:18Z","request-id":"Julias-MacBook-Pro.local/LulWJzXL2k-000166"},"message":"error: bad request: decompsedFS: requested quota is higher than allowed"}}

Screenshots (if appropriate):

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:

@sonarcloud
Copy link

sonarcloud bot commented Jun 7, 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 1 Code Smell

25.0% 25.0% Coverage
0.0% 0.0% Duplication

@2403905 2403905 merged commit 4f9a82e into owncloud:master Jun 14, 2023
ownclouders pushed a commit that referenced this pull request Jun 14, 2023
Handle the bad request status for the CreateStorageSpace function
@micbar micbar mentioned this pull request Jul 24, 2023
68 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.

Exceeding quota after ocis_max_size_quota set gives 500 status code
2 participants