API schema for PATCH article contains invalid/broken field customArticleTemplate | World Anvil

Remove these ads. Join the Worldbuilders Guild

API schema for PATCH article contains invalid/broken field customArticleTemplate

open
· Api ·
By Rumengol on 04/26/2024
· Assigned to GorkamWorka

First Issue (minor)

While trying to patch articles, I was hit with an error 403 "access denied" while trying to update a disallowed field (I took an article JSON and sent the PATCH request as is, with all the article's field). According to Gorkam on Discord, this should be an error 422 rather than 403.  

Second issue

Following this page, I removed all the fields that did not appear in the PATCH schema and was hit with a different error : an error 500 with the response of an error 404.
  After some fiddling, I found that this happens when the request contains the customArticleTemplate field, even though it appears as a nullable string in the schema. The exact same request that led to the error 500 above, except without the customArticleTemplate field returns a 200 OK. I tried with a value for this field instead of null, with no luck.   Tested when the article is a draft, published, and private, for the same results.

Steps to Reproduce

1. Create any article 2. Send a PATCH request for the article containing the customArticleTemplate (works the same if it is null, a uuid string or an object with the same structure as the one gotten from a GET request) 3. Get the error 500

Operating System

Windows

Browser

Firefox

History

GorkamWorka @ 26 Apr, 2024 01:45:00 Assignee

will look into that

GorkamWorka @ 26 Apr, 2024 01:45:14 Assignee
Assigned GorkamWorka