Add ErrorDescription with auth and links
ErrorThrownAction triggers an AUTH_EXPIRED in middleware. AuthReducer extracts auth links to upddate state.links. It's unclear what the shape is of auth.links: Errors.test.js utilizes an auth.links of type arrayOf({ name: string, label:string, login: string, logout: string, callback: string, }) OrganizationsPage consumes links w/ shape of shape({ organizations: string.isRequired, config: shape({ auth: string.isRequired, }).isRequired, }) UsersPage consumes links w/ shape of shape({ users: string.isRequired, }), ProvidersPage consumes links w/ shape of shape({ organizations: string.isRequired, }), Purgatory consumes links w/ shape of shape({ me: string, }), UserNavBlock at some point expected shape({ me: string, external: shape({ custom: arrayOf( shape({ name: string.isRequired, url: string.isRequired, }) ), }), })pull/10616/head
parent
bbd66da6e2
commit
8c2e8a2176
|
@ -10,12 +10,12 @@ export type ErrorThrownActionCreator = (
|
|||
|
||||
interface ErrorThrownAction {
|
||||
type: 'ERROR_THROWN'
|
||||
error: Error
|
||||
error: ErrorDescription
|
||||
altText?: string
|
||||
alertType?: AlertType
|
||||
}
|
||||
export const errorThrown = (
|
||||
error: Error,
|
||||
error: ErrorDescription,
|
||||
altText?: string,
|
||||
alertType?: AlertType
|
||||
): ErrorThrownAction => ({
|
||||
|
@ -24,3 +24,12 @@ export const errorThrown = (
|
|||
altText,
|
||||
alertType,
|
||||
})
|
||||
|
||||
interface ErrorDescription {
|
||||
status: number
|
||||
auth: {
|
||||
links: {
|
||||
me: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue