Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

provide more specific error responses when submitting a new language code questionnaire #609

Open
da1nerd opened this issue Jun 6, 2016 · 0 comments
Assignees

Comments

@da1nerd
Copy link

da1nerd commented Jun 6, 2016

@vleong2332 @Redmayspecial:

Right now the api at http://td-demo.unfoldingword.org/api/questionnaire/ will respond with a success message or an error message. I would like to distinguish between the submittion failing due to a duplicate submission or some other error.

Allowed Response Status':

  • success
  • duplicate
  • error

The addition of the duplicate status will allow the app to reliably determine if a questionnaire has already been submitted and update locally stored data as appropriate.
Explicitely stating the status as duplicate will eliminate possible bugs in parsing the message due to changes in the database schema, or format of the status message.

Response Structure

{
  "status": "success|duplicate|error",
  "message": "Some message"
}
@vleong2332 vleong2332 self-assigned this Jun 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants