This commit is contained in:
alma 2025-05-23 17:24:58 +02:00
parent 7a5e68f0c8
commit 2be19ea579
2 changed files with 27 additions and 2 deletions

View File

@ -469,11 +469,14 @@ export async function POST(request: Request) {
rocketChatChannel: !!missionResponse.rocketChatChannelId rocketChatChannel: !!missionResponse.rocketChatChannelId
}, },
resourceStatus: { resourceStatus: {
gitRepo: true, gitRepo: false,
leantimeProject: true, leantimeProject: true,
docCollection: true, docCollection: true,
rocketChatChannel: true rocketChatChannel: true
} },
errors: [
'Git repository creation failed: Unknown error'
]
}); });
} catch (error) { } catch (error) {
console.error('Error creating mission:', error); console.error('Error creating mission:', error);

View File

@ -93,6 +93,28 @@ export class N8nService {
try { try {
const result = JSON.parse(responseText); const result = JSON.parse(responseText);
console.log('Parsed workflow result:', JSON.stringify(result, null, 2)); console.log('Parsed workflow result:', JSON.stringify(result, null, 2));
// Check if the response contains error information
if (result.error || result.message?.includes('failed')) {
// Extract which services failed from the error message
const errorMessage = result.message || result.error;
const failedServices = {
gitRepo: errorMessage.includes('Git repository creation failed'),
leantimeProject: errorMessage.includes('Leantime project creation failed'),
docCollection: errorMessage.includes('Documentation collection creation failed'),
rocketChatChannel: errorMessage.includes('RocketChat channel creation failed')
};
// Return success with partial results
return {
success: true,
results: {
...result,
failedServices
}
};
}
return { return {
success: true, success: true,
results: result results: result