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(API): Add a log entry when an error occurs so the admin can pass … #206

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

nickvergessen
Copy link
Member

…on information to the developers

…on information to the developers

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen added 3. to review Waiting for reviews bug Something isn't working labels Apr 5, 2023
@nickvergessen nickvergessen self-assigned this Apr 5, 2023
@nickvergessen
Copy link
Member Author

/backport to stable26

@backportbot-nextcloud backportbot-nextcloud bot added the backport-request A backport was requested for this pull request label Apr 5, 2023
@nickvergessen
Copy link
Member Author

Applied on production

@nickvergessen
Copy link
Member Author

Error occurred in 1-1 chat between Jan and Tobi

{
  "reqId": "LhMSPkGOxN7JmcrwVZQj",
  "level": 3,
  "time": "2023-04-05T10:35:38+00:00",
  "remoteAddr": "",
  "user": "",
  "app": "related_resources",
  "method": "GET",
  "url": "/ocs/v2.php/apps/related_resources/related/talk?itemId=…&format=json",
  "message": "",
  "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0",
  "version": "26.0.0.10",
  "exception": {
    "Exception": "OCA\\Circles\\Exceptions\\FederatedUserNotFoundException",
    "Message": "",
    "Code": 404,
    "Trace": [
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/apps/related_resources/lib/Service/RelatedService.php",
        "line": 431,
        "function": "getCurrentFederatedUser",
        "class": "OCA\\Circles\\CirclesManager",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/apps/related_resources/lib/Service/RelatedService.php",
        "line": 201,
        "function": "filterUnavailableResults",
        "class": "OCA\\RelatedResources\\Service\\RelatedService",
        "type": "->",
        "args": [
          [
            [
              "OCA\\RelatedResources\\Model\\RelatedResource"
            ],
            [
              "OCA\\RelatedResources\\Model\\RelatedResource"
            ],
            [
              "OCA\\RelatedResources\\Model\\RelatedResource"
            ],
            [
              "OCA\\RelatedResources\\Model\\RelatedResource"
            ]
          ]
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/apps/related_resources/lib/Service/RelatedService.php",
        "line": 119,
        "function": "retrieveRelatedToItem",
        "class": "OCA\\RelatedResources\\Service\\RelatedService",
        "type": "->",
        "args": [
          "talk",
          "2183082586"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/apps/related_resources/lib/Controller/ApiController.php",
        "line": 104,
        "function": "getRelatedToItem",
        "class": "OCA\\RelatedResources\\Service\\RelatedService",
        "type": "->",
        "args": [
          "talk",
          "c9pd8yti",
          7
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 230,
        "function": "getRelatedResources",
        "class": "OCA\\RelatedResources\\Controller\\ApiController",
        "type": "->",
        "args": [
          "talk",
          "c9pd8yti"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 137,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\RelatedResources\\Controller\\ApiController"
          ],
          "getRelatedResources"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/App.php",
        "line": 183,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\RelatedResources\\Controller\\ApiController"
          ],
          "getRelatedResources"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\RelatedResources\\Controller\\ApiController",
          "getRelatedResources",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "talk",
            "ocs.related_resources.Api.getRelatedResources"
          ]
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/ocs/v1.php",
        "line": 63,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/ocsapp/apps/related_resources/related/talk"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/ocs/v2.php",
        "line": 23,
        "args": [
          "/var/www/cloud.nextcloud.com/nextcloud/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/cloud.nextcloud.com/nextcloud/apps/circles/lib/CirclesManager.php",
    "Line": 257,
    "message": "",
    "exception": {
      "class": "OCA\\Circles\\Exceptions\\FederatedUserNotFoundException",
      "status": 404,
      "code": 404,
      "message": ""
    },
    "CustomMessage": ""
  }
}

@nickvergessen nickvergessen merged commit 6426b46 into master Apr 13, 2023
@delete-merged-branch delete-merged-branch bot deleted the bugfix/noid/logging branch April 13, 2023 05:37
@backportbot-nextcloud backportbot-nextcloud bot removed the backport-request A backport was requested for this pull request label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants