rename decline to reject
This commit is contained in:
parent
90569d885f
commit
e7a5e331f1
2 changed files with 15 additions and 15 deletions
|
|
@ -363,7 +363,7 @@ async function connect(url?: string): Promise<void> {
|
|||
continue;
|
||||
} else {
|
||||
console.log('Maximum attempts reached. Declining request.');
|
||||
return { action: 'decline' };
|
||||
return { action: 'reject' };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -381,7 +381,7 @@ async function connect(url?: string): Promise<void> {
|
|||
continue;
|
||||
} else {
|
||||
console.log('Maximum attempts reached. Declining request.');
|
||||
return { action: 'decline' };
|
||||
return { action: 'reject' };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -408,13 +408,13 @@ async function connect(url?: string): Promise<void> {
|
|||
console.log('Please re-enter the information...');
|
||||
continue;
|
||||
} else {
|
||||
return { action: 'decline' };
|
||||
return { action: 'reject' };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Maximum attempts reached. Declining request.');
|
||||
return { action: 'decline' };
|
||||
return { action: 'reject' };
|
||||
});
|
||||
|
||||
transport = new StreamableHTTPClientTransport(
|
||||
|
|
|
|||
|
|
@ -205,12 +205,12 @@ const getServer = () => {
|
|||
},
|
||||
],
|
||||
};
|
||||
} else if (result.action === 'decline') {
|
||||
} else if (result.action === 'reject') {
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
type: 'text',
|
||||
text: `No information was collected. User declined to provide ${infoType} information.`,
|
||||
text: `No information was collected. User rejectd to provide ${infoType} information.`,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
@ -458,7 +458,7 @@ if (useOAuth) {
|
|||
}
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
|
||||
if (strictOAuth) {
|
||||
if (!data.aud) {
|
||||
throw new Error(`Resource Indicator (RFC8707) missing`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue