Dynamic Content Load Failure Codes¶
Content on Brekz Website is loaded using the content loader, which relies on the URL key-value store to map the URL/slug to a specific entry. While this system works fine most of the time, it is of course possible for something to go wrong.
Luckily ContentController.php will report the failure that occurred in the response of your request, allowing you to easily see what went wrong.
How can I get the failure code?¶
If content fails to load, you will just the 404 error page.
It is completely possible that the page actually doesn't exist, but if you are sure it should exist, you can use the failure code in the response to get more information.
Open the network tab in your browser and check the X-DCL-FAIL (stands for: Dynamic Content Load failure) response header. This is the failure code that describes what went wrong.
Invalid content
It is also possible it returns a HTTP 500 if the content itself is invalid or there is a bug in the code of a dynamic content section.
If this happens, the X-DCL-FAIL header will probably also be missing, so check the application log instead to see what went wrong.
How are failure codes designed?¶
The failure code is just the first letter of each word of the failure reason, which is defined in ContentLoadFailedHttpHeaderEnum.php.
So for example the failure reason SLUG_NOT_IN_KEY_VALUE_STORE becomes SNIKVS. (Slug Not In Key Value Store)
This way it's easy for Flooris/Brekz to know the failure reason, without making it obvious to people outside Flooris/Brekz that might abuse this knowledge in some way.
Which failure codes exist?¶
In the table below you can see all the failure codes that exist, together with their reason and explanation in simpler words.
This list is a best-effort
While we try to keep this list up to date with the actual source code, it might be possible for this to become slightly outdated at some point.
The most up-to-date list can be found inside ContentLoadFailedHttpHeaderEnum.php.
| Failure code | Failure reason | Explanation |
|---|---|---|
SNIKVS |
SLUG_NOT_IN_KEY_VALUE_STORE |
The URL/slug isn't inside the URL key-value store, so it doesn't know what to load. The page might just not exist at all or the key-value store is outdated. |
KVSUPT |
KEY_VALUE_STORE_UNKNOWN_PAGE_TYPE |
The URL/slug is known, but Brekz Website doesn't know how to handle this page type. This is most likely a bug and should be reported to Flooris. |
ODSRACF |
ON_DEMAND_SECTIONS_RENDER_API_CALL_FAILED |
The URL/slug is known, but the sections to assemble the page is missing and attempting to fetch them from Brekz CMS failed for some reason. The missing-sections-YYYY-MM-DD.log file might provide context. |
ODSRACSBSNS |
ON_DEMAND_SECTIONS_RENDER_API_CALL_SUCCESS_BUT_STILL_NO_SECTIONS |
The URL/slug is known, the sections to assemble to page were missing and we asked Brekz CMS to provide them. Brekz CMS returned success but the sections are still missing for some reason. This is most likely a bug and should be reported to Flooris. |