Closed AishaHassen closed 3 months ago
Thanks for the feedback @AishaHassen! This stuff is so valuable.
Some notes/comments from me
get
function docs do actually have two examples, but they are badly formatted. The JSDoc needs fixing!I think Prettier may have formatted this code weirdly
Yes, we should document those parameters. @hunterachieng the best way to do this is a typedef, see RequestOptions in the HTTP adaptor (look at http.get in the docs side and the http jsdoc in the code). All references to the same parameters should use the same typedef.
interesting, the error comes back as a html doc. I suppose this is just a regular get on commcarehq.org
or whatever, such as a browser would make. We'll have to add some special handling for this. I expect POST to return JSON but maybe GET needs to check if the response if HTML and, if so, just say "resource not found." It would be nice to include the actual requested url in the error message.
Same as (3) really - let's just handle 404s better on get
@hunterachieng We'll have to reproduce and debug that locally.
@hunterachieng the POST function needs to be marked @public
(like get
is )
I'm sorry I'm not sure what that means! :blush:
@AishaHassen Thank you for the valuable feedback!
@josephjclark I will look at the issues and fix them accordingly
@josephjclark @hunterachieng Clarification on point 7: The following links (Registration Form Example, Nawiri Example)found under example section in commcare seem to be empty. I've created it along with this issue because I feel it's a bug that's preventing the examples being shown and not lack of content. Please let me know if the examples actually do lack content so I can create a separate issue for these two.
@AishaHassen I will look into all the feedback. Thank you
Ah thanks @AishaHassen - I don't even know how the examples are managed. Looks to me like they should just be removed. I'll dig into it and post back here
Fixes:
get('user')
@hunterachieng QA testing comments for #528
get("users")
instead ofget("user")
and got the error message below in the log. A better response would be something that indicates that the requested resource does not exist on CommcareJob Error
. A better response would be that that resource with the specified id does not exisit