Error message when renaming a fleet now mentions the target name.

Change-type: patch
Signed-off-by: Carlo Miguel F. Cruz <carloc@balena.io>
This commit is contained in:
Carlo Miguel F. Cruz 2021-10-04 11:52:24 +08:00
parent 9487b33144
commit c493c33e38
No known key found for this signature in database
GPG Key ID: 997DBC01FCE3FD53

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;
}