diff --git a/npm/ng-packs/packages/schematics/src/enums/exception.ts b/npm/ng-packs/packages/schematics/src/enums/exception.ts index b267ad6674..b7b206cbf6 100644 --- a/npm/ng-packs/packages/schematics/src/enums/exception.ts +++ b/npm/ng-packs/packages/schematics/src/enums/exception.ts @@ -5,7 +5,7 @@ export const enum Exception { InvalidModule = '[Invalid Module] Backend module "{0}" does not exist in API definition.', InvalidApiDefinition = '[Invalid API Definition] The provided API definition is invalid.', InvalidWorkspace = '[Invalid Workspace] The angular.json should be a valid JSON file.', - NoApi = '[API Not Available] Please double-check the URL in the source project environment and make sure your application is up and running.', + NoApi = '[API Not Available] Request to {0} is unsuccessful. Please double-check the URL in the source project environment and make sure your application is up and running.', NoProject = '[Project Not Found] Either define a default project in your workspace or specify the project name in schematics options.', NoProxyConfig = '[Proxy Config Not Found] There is no JSON file at "{0}".', NoTypeDefinition = '[Type Definition Not Found] There is no type definition for "{0}".', diff --git a/npm/ng-packs/packages/schematics/src/utils/source.ts b/npm/ng-packs/packages/schematics/src/utils/source.ts index e1e965744f..a5f0dd1232 100644 --- a/npm/ng-packs/packages/schematics/src/utils/source.ts +++ b/npm/ng-packs/packages/schematics/src/utils/source.ts @@ -36,7 +36,7 @@ async function getApiDefinition(sourceUrl: string) { } catch ({ response }) { // handle redirects if (!response?.body || response.statusCode >= 400) - throw new SchematicsException(Exception.NoApi); + throw new SchematicsException(interpolate(Exception.NoApi, url)); body = response.body; }