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

OCS Api to get app config value is throwing on unknown values instead of returning specified default #42846

Closed
nickvergessen opened this issue Jan 16, 2024 · 0 comments · Fixed by #42844
Assignees
Labels
1. to develop Accepted and waiting to be taken care of 29-feedback bug php Pull requests that update Php code regression
Milestone

Comments

@nickvergessen
Copy link
Member

nickvergessen commented Jan 16, 2024

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • 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.
{
  "Exception": "OCP\\Exceptions\\AppConfigUnknownKeyException",
  "Message": "unknown config key",
  "Code": 0,
  "Trace": [
    {
      "file": "/home/runner/actions-runner/_work/spreed/spreed/lib/private/AppConfig.php",
      "line": 299,
      "function": "isLazy",
      "class": "OC\\AppConfig",
      "type": "->",
      "args": [
        "guests",
        "whitelist"
      ]
    },
    {
      "file": "/home/runner/actions-runner/_work/spreed/spreed/apps/provisioning_api/lib/Controller/AppConfigController.php",
      "line": 110,
      "function": "getValueMixed",
      "class": "OC\\AppConfig",
      "type": "->",
      "args": [
        "guests",
        "whitelist",
        "",
        null
      ]
    },
    {
      "file": "/home/runner/actions-runner/_work/spreed/spreed/lib/private/AppFramework/Http/Dispatcher.php",
      "line": 232,
      "function": "getValue",
      "class": "OCA\\Provisioning_API\\Controller\\AppConfigController",
      "type": "->",
      "args": [
        "guests",
        "whitelist",
        ""
      ]
    },
    {
      "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\\Provisioning_API\\Controller\\AppConfigController"
        ],
        "getValue"
      ]
    },
    {
      "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\\Provisioning_API\\Controller\\AppConfigController"
        ],
        "getValue"
      ]
    },
    {
      "file": "/home/runner/actions-runner/_work/spreed/spreed/lib/private/Route/Router.php",
      "line": 315,
      "function": "main",
      "class": "OC\\AppFramework\\App",
      "type": "::",
      "args": [
        "OCA\\Provisioning_API\\Controller\\AppConfigController",
        "getValue",
        [
          "OC\\AppFramework\\DependencyInjection\\DIContainer"
        ],
        [
          "guests",
          "whitelist",
          "ocs.provisioning_api.AppConfig.getValue"
        ]
      ]
    },
    {
      "file": "/home/runner/actions-runner/_work/spreed/spreed/ocs/v1.php",
      "line": 65,
      "function": "match",
      "class": "OC\\Route\\Router",
      "type": "->",
      "args": [
        "/ocsapp/apps/provisioning_api/api/v1/config/apps/guests/whitelist"
      ]
    },
    {
      "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/AppConfig.php",
  "Line": 192,
  "CustomMessage": "Exception thrown: OCP\\Exceptions\\AppConfigUnknownKeyException"
}

Breaking Talk integration tests.

@nickvergessen nickvergessen added bug 1. to develop Accepted and waiting to be taken care of regression php Pull requests that update Php code labels Jan 16, 2024
@nickvergessen nickvergessen added this to the Nextcloud 29 milestone Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of 29-feedback bug php Pull requests that update Php code regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants