Git Product home page Git Product logo

coam-client's People

Contributors

dependabot[bot] avatar igrom avatar istanishev avatar pfavaloro avatar rnowosielski avatar runebaas avatar sandeshbafna avatar thoean avatar victorcuena avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

coam-client's Issues

"TypeError: Cannot read property 'status' of undefined when I call createGroupWithUser

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.

hasPermission should throw exception

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.

Fix unit tests

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.

createGroup returns Undefined on success

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!

Add a method to convert from groupId to groupUrl

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.