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

OutOfRangeException on integration tests #11015

Closed
nickvergessen opened this issue Nov 27, 2023 · 0 comments · Fixed by nextcloud/server#41779 or #11019
Closed

OutOfRangeException on integration tests #11015

nickvergessen opened this issue Nov 27, 2023 · 0 comments · Fixed by nextcloud/server#41779 or #11019
Assignees
Labels

Comments

@nickvergessen
Copy link
Member

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Combination of

Potential solution

  • Middleware that catches OutOfRangeException and converts it to a 400 status code, so the API doesn't break
{
  "Exception": "OutOfRangeException",
  "Message": "Parameter amount must be between 1 and 20",
  "Code": 0,
  "Trace": [
    {
      "file": "/home/runner/actions-runner/_work/spreed/spreed/lib/private/AppFramework/Http/Dispatcher.php",
      "line": 223,
      "function": "ensureParameterValueSatisfiesRange",
      "class": "OC\\AppFramework\\Http\\Dispatcher",
      "type": "->",
      "args": [
        "amount",
        21
      ]
    },
    {
      "file": "/home/runner/actions-runner/_work/spreed/spreed/lib/private/AppFramework/Http/Dispatcher.php",
      "line": 138,
      "function": "executeController",
      "class": "OC\\AppFramework\\Http\\Dispatcher",
      "type": "->",
      "args": [
        [
          "OCA\\Talk\\Controller\\BreakoutRoomController"
        ],
        "configureBreakoutRooms"
      ]
    },
    {
      "file": "/home/runner/actions-runner/_work/spreed/spreed/lib/private/AppFramework/App.php",
      "line": 184,
      "function": "dispatch",
      "class": "OC\\AppFramework\\Http\\Dispatcher",
      "type": "->",
      "args": [
        [
          "OCA\\Talk\\Controller\\BreakoutRoomController"
        ],
        "configureBreakoutRooms"
      ]
    },
    {
      "file": "/home/runner/actions-runner/_work/spreed/spreed/lib/private/Route/Router.php",
      "line": 315,
      "function": "main",
      "class": "OC\\AppFramework\\App",
      "type": "::",
      "args": [
        "OCA\\Talk\\Controller\\BreakoutRoomController",
        "configureBreakoutRooms",
        [
          "OC\\AppFramework\\DependencyInjection\\DIContainer"
        ],
        [
          "v1",
          "snac2av7",
          "ocs.spreed.BreakoutRoom.configureBreakoutRooms"
        ]
      ]
    },
    {
      "file": "/home/runner/actions-runner/_work/spreed/spreed/ocs/v1.php",
      "line": 64,
      "function": "match",
      "class": "OC\\Route\\Router",
      "type": "->",
      "args": [
        "/ocsapp/apps/spreed/api/v1/breakout-rooms/snac2av7"
      ]
    },
    {
      "file": "/home/runner/actions-runner/_work/spreed/spreed/ocs/v2.php",
      "line": 23,
      "args": [
        "/home/runner/actions-runner/_work/spreed/spreed/ocs/v1.php"
      ],
      "function": "require_once"
    }
  ],
  "File": "/home/runner/actions-runner/_work/spreed/spreed/lib/private/AppFramework/Http/Dispatcher.php",
  "Line": 264,
  "CustomMessage": "Exception thrown: OutOfRangeException"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment