Closed tfrancois closed 1 year ago
On further investigation, this error occurred because I was passing a bad path 'admin/users' instead of '/admin/users' to the GET method, but in case another user does the same mistake I did, the API should report the correct error (and not one based on trying to parse an undefined or null params object for a (GET) method that shouldn't expect one).
@tfrancois I'm glad you were able to sort out the issue, and I hope you'll be glad to know that we are spending some time on improving our developer experience. In case you are interested in providing us with some feedback to that end, here are some details on a project Duo is working on:
Duo is looking to learn how to significantly improve the developer experience and what tools, resources, and technology (eg: sandboxes, new sdks, etc.) would best-enable customers to work faster and build things more easily with Duo's developer ecosystem. If your org is a Duo customer, and you have done development work (ex; authentication integrations, creation of a homegrown admin tool, log consumption for SIEMS, etc) with Duo's developer tools/resources in the past year, we would love to speak with you about your experience, what tools/resources you used, and your pain points. This will be a 60-minute session during which you’ll have the opportunity to discuss your honest thoughts and feedback with Duo researchers. No preparation is necessary, and please know that this is not a sales call or product demo. If you’re interested in participating, please email lli@duosecurity.com to start the scheduling process. Once the 60-minute session is complete, you will receive a token of appreciation in the form of a $75 e-gift card through Tremendous (options for Amazon or select retailers). Please let me know if you have any questions! Thanks!
When performing a normal GET request for a user using the jsonApiCall method, if a null or undefined value is passed to the "params" parameter in a GET request (for example a GET user), this API library crashes with a weird error:
This error is the result of the library wanting to perform an Object.keys() on the params object, BUT this API as documented states there are no parameters required so there should be no need to pass this argument - meaning a null or undefined value should be acceptable and ignored!
I came across this error when I passed an invalid user_id to the retrieve user API method: GET /admin/v1/users/[user_id].