fix: review fixes for MCP and API key feature
- Remove spurious ALTER TABLE client_targets DROP DEFAULT from migration (Prisma schema drift side-effect unrelated to this PR) - Surface revoke errors in ApiKeysPage UI via deleteApiKey.isError - Fix UpdateProjectInput.color type to allow null, removing unsafe cast in the update_project MCP tool handler
This commit is contained in:
@@ -49,8 +49,8 @@ export function ApiKeysPage() {
|
||||
try {
|
||||
await deleteApiKey.mutateAsync(id);
|
||||
setRevokeConfirmId(null);
|
||||
} catch (err) {
|
||||
// error is surfaced inline via mutation state
|
||||
} catch (_err) {
|
||||
// error rendered below the table row via deleteApiKey.error
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,14 @@ export function ApiKeysPage() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{deleteApiKey.isError && (
|
||||
<div className="mb-4 p-3 bg-red-50 border border-red-200 rounded-lg text-red-700 text-sm">
|
||||
{deleteApiKey.error instanceof Error
|
||||
? deleteApiKey.error.message
|
||||
: "Failed to revoke API key"}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{isLoading ? (
|
||||
<div className="text-center py-12 text-gray-400 text-sm">Loading...</div>
|
||||
) : !apiKeys || apiKeys.length === 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user