cimpress / coam-client Goto Github PK
View Code? Open in Web Editor NEWA thin client to perform certain requests in COAM.
License: MIT License
A thin client to perform certain requests in COAM.
License: MIT License
I'm getting '"TypeError: Cannot read property 'status' of undefined.
Following is the snippet of the code which generates the error.
if (!(_context.t0.response.status !== 404)) {
_context.next = 32;
break;
}
(node:46543) ErrorObjectPolyFill: "TypeError: Cannot read property 'status' of undefined\n at CoamClient._callee$ (coam-client/lib/CoamClient.js:585:44)
But groups are getting created successfully.
The call to hasPermission
only returns true or false.
In case of false
, it's not clear whether the call to COAM failed (from a 500 to a network error), or whether the user actually does not have permissions.
Various unit tests return an unhandled promise exception. The reason is that the response is inspected and transformed, but not accordingly mocked.
The unit tests still pass, but the errors are annoying in the console.
If I do
let id = await CoamClient.createGroup(jwt, groupName, description);
I can see that the group gets created in COAM and the Promise resolves, but id
is undefined. I would expect either the groupId or the entire response entity be returned.
Looking at the code, it seems like it should return the entire response body, so I'm not sure where the bug is.
Thanks!
At least one method has the user pass groupUrl as a parameter instead of groupId. As the library seems to target both users using IDs and URLs and doesn't seem to preclude either pattern, it makes sense for it to have a convenience method to construct the URL from the ID, so that both types of users can leverage the whole library.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.