#64: Getting 400 error once customer accesses public article

Symptoms

Whenever customer tries to access public article by URL https://domain.tld/articles/UID

the following error appears:

{

  "headers": {

    "Accept": "application/json, text/plain, */*",

    "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzAxODQ5MjA1LCJpYXQiOjE3MDE3NjI4MDUsImp0aSI6IjYyMDU1OWM2NjM5OTRjYTVhOTc3YmNmZTY1YTM2ZWE3IiwidXNlcl9pZCI6NTgzMn0.WJIBejOMXUCg7fSnLXA8T-Xoj4mJfUDYaXijHV_kfDY"

  },

  "url": "/employees/undefined/",

  "method": "get",

  "message": "Request failed with status code 404",

  "response": {

    "data": {

      "detail": "Not found."

    },

    "status": 404,

    "statusText": "",

    "headers": {

      "allow": "GET, PUT, PATCH, HEAD, OPTIONS",

      "content-language": "en",

      "content-length": "23",

      "content-type": "application/json",

      "cross-origin-opener-policy": "same-origin",

      "date": "Wed, 06 Dec 2023 07:32:26 GMT",

      "referrer-policy": "origin-when-cross-origin",

      "server": "uvicorn",

      "strict-transport-security": "max-age=63072000; includeSubDomains; preload",

      "vary": "Accept, Accept-Language,Origin",

      "x-content-type-options": "nosniff",

      "x-frame-options": "SAMEORIGIN"

    },

    "config": {

      "transitional": {

        "silentJSONParsing": true,

        "forcedJSONParsing": true,

        "clarifyTimeoutError": false

      },

      "adapter": [

        "xhr",

        "http"

      ],

      "transformRequest": [

        null

      ],

      "transformResponse": [

        null

      ],

      "timeout": 0,

      "xsrfCookieName": "XSRF-TOKEN",

      "xsrfHeaderName": "X-XSRF-TOKEN",

      "maxContentLength": -1,

      "maxBodyLength": -1,

      "env": {},

      "headers": {

        "Accept": "application/json, text/plain, */*",

        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzAxODQ5MjA1LCJpYXQiOjE3MDE3NjI4MDUsImp0aSI6IjYyMDU1OWM2NjM5OTRjYTVhOTc3YmNmZTY1YTM2ZWE3IiwidXNlcl9pZCI6NTgzMn0.WJIBejOMXUCg7fSnLXA8T-Xoj4mJfUDYaXijHV_kfDY"

      },

      "baseURL": "https://sd.usergate.com/api",

      "params": {},

      "paramsSerializer": {},

      "method": "get",

      "url": "/employees/undefined/"

},

    "request": {}

  }

}

Resolution

Please provide public link of the article

Root cause

Article is avilble by another public link that could be watched inside the article in the bottom of article editor and looks like

https://da.swd.im/article/en/64-getting-4040-error-once-customer-accesses-public-article.html