mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-09-23 18:40:44 +02:00
fix(editor): Show nice error when environment is not set up (#7778)
Adds a nicer error message with a link for owners who press Push to Git without having a repository connected yet.
This commit is contained in:
+8
-1
@@ -8,7 +8,14 @@ export const sourceControlLicensedAndEnabledMiddleware: RequestHandler = (req, r
|
||||
if (sourceControlPreferencesService.isSourceControlLicensedAndEnabled()) {
|
||||
next();
|
||||
} else {
|
||||
res.status(401).json({ status: 'error', message: 'Unauthorized' });
|
||||
if (!sourceControlPreferencesService.isSourceControlConnected()) {
|
||||
res.status(412).json({
|
||||
status: 'error',
|
||||
message: 'source_control_not_connected',
|
||||
});
|
||||
} else {
|
||||
res.status(401).json({ status: 'error', message: 'Unauthorized' });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user