Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

User invite error handling #1105

Merged
merged 16 commits into from
May 30, 2017
Merged

Conversation

msecret
Copy link
Contributor

@msecret msecret commented May 24, 2017

Adds error handling for user invite feature. Ensures at any part of the 3 step request process, that if something goes wrong, there's an error added in the form for the user.

Marco Segreto and others added 16 commits May 24, 2017 13:16
I'm getting the following failure:

```
cfApi deleteOrgUserPermissions() should call an http delete request on org user with permissions FAILED
        Expected spy "delete" (empty string)to have been called once. "delete" was called twice.
```

I'm guessing it's because of issues with promises in the API file
where not all of them are working async correcty by using done
and then statements.
In promise async code it was calling
When the user invite request fails so we can show error messaging
to the user.
As this is part of the invite user flow, so the user needs to know
something went wrong.
So the store can receive it and take action on it.
So I can re-use it for any type of error that isn't specific to
one user.
For when the invite process goes wrong.
So when the user invites somebody and something goes wrong, they
know specifically what invite had the problem.
With slightly different error messaging. This is different because
at this point, the user was invited, so the user would have to take
a different action on their end.
Looking at the UI, I realized that putting these errors in a global
context of the whole user list is not really correct, these should
actually be tied with the invite form, as they're all related to
that.
Which sets both the cf error object and adds a contextual error
message set by us.
Required that uaa api code correctly unwrapped error message to
expose actual object.
So if you submit a problematic email, we check that an error message
is correctly displayed.
Copy link
Contributor

@rememberlenny rememberlenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

@@ -7,7 +7,6 @@
import React from 'react';

import Action from './action.jsx';
import ErrorMessage from './error_message.jsx';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to lint for unused dependencies?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question.

This looks like it does it: https://github.com/depcheck/depcheck

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when does it get called? i didn't see an error for it in the build before it was fixed.

@rememberlenny rememberlenny merged commit 318c32b into master May 30, 2017
@rememberlenny rememberlenny deleted the ms-invite_user_error_handling branch May 30, 2017 14:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants