feat: handle 202 queued response and awaiting_approval status in ensurePeered
This commit is contained in:
@@ -31,4 +31,15 @@ describe('EnsurePeeredResult type', () => {
|
||||
};
|
||||
expect(result.status).toBe('failed');
|
||||
});
|
||||
|
||||
it('pending result has error', () => {
|
||||
const result: EnsurePeeredResult = {
|
||||
status: 'pending',
|
||||
error: 'Awaiting admin approval on remote instance',
|
||||
};
|
||||
expect(result.status).toBe('pending');
|
||||
if (result.status === 'pending') {
|
||||
expect(result.error).toContain('admin approval');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user