You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you send submission XML whose version attribute does not match any version of the form, then Backend returns a 404.1 Problem ("Could not find the resource you were looking for."):
Forms.getByProjectAndXmlFormId(projectId,formId,false,version)// TODO: okay so this is exactly the same as the func above..
.then(getOrNotFound)
.then(ensureDef)
However, especially if the user doesn't know about the version attribute or that Backend is searching on it, they might not understand why they're receiving a 404 response and might not know how to proceed. (The user might wonder: Does the URL not match a current endpoint? Is the project ID wrong? The form ID?) I think I've gotten confused around this myself after forgetting to specify the version attribute.
I think it'd be useful to return a specific 404 Problem in this case. I think it'd be useful for the Problem to indicate the project ID + xmlFormId + form version string that Backend is looking for. The forum post mentions the REST endpoint specifically, but I think it'd be useful to update both the REST and OpenRosa endpoints.
From the forum: https://forum.getodk.org/t/central-api-docs-example-submission-xml-issue/39139
If you send submission XML whose
version
attribute does not match any version of the form, then Backend returns a 404.1 Problem ("Could not find the resource you were looking for."):central-backend/lib/resources/submissions.js
Lines 123 to 127 in a2ca89a
central-backend/lib/resources/submissions.js
Lines 209 to 212 in a2ca89a
However, especially if the user doesn't know about the
version
attribute or that Backend is searching on it, they might not understand why they're receiving a 404 response and might not know how to proceed. (The user might wonder: Does the URL not match a current endpoint? Is the project ID wrong? The form ID?) I think I've gotten confused around this myself after forgetting to specify theversion
attribute.I think it'd be useful to return a specific 404 Problem in this case. I think it'd be useful for the Problem to indicate the project ID +
xmlFormId
+ form version string that Backend is looking for. The forum post mentions the REST endpoint specifically, but I think it'd be useful to update both the REST and OpenRosa endpoints.CC @lindsay-stevens
The text was updated successfully, but these errors were encountered: