improve error handling for 401 requests and fetch

This commit is contained in:
Gregor Vostrak
2024-06-01 00:12:03 +02:00
parent a64ee87d19
commit bae4265f70
13 changed files with 305 additions and 249 deletions

View File

@@ -24,15 +24,16 @@ async function invitePlaceholder(id: string) {
const organizationId = getCurrentOrganizationId();
if (organizationId) {
await handleApiRequestNotifications(
api.invitePlaceholder(
{},
{
params: {
organization: organizationId,
member: id,
},
}
),
() =>
api.invitePlaceholder(
{},
{
params: {
organization: organizationId,
member: id,
},
}
),
'Member invited successfully',
'Error inviting member'
);