Merge pull request #2357 from balena-io/fix-fleet-rename-error-message

Error message when renaming a fleet now mentions the target name.
This commit is contained in:
bulldozer-balena[bot] 2021-10-05 10:27:51 +00:00 committed by GitHub
commit bd774e8553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,7 +120,7 @@ export class FleetRenameCmd extends Command {
} catch (e) {
// BalenaRequestError: Request error: "organization" and "app_name" must be unique.
if ((e.message || '').toLowerCase().includes('unique')) {
throw new ExpectedError(`Error: fleet ${params.fleet} already exists.`);
throw new ExpectedError(`Error: fleet ${newName} already exists.`);
}
throw e;
}