mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00: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:
committed by
GitHub
parent
67a88914f2
commit
5835e055d3
@@ -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