Skip to content

Commit

Permalink
fix: registry index location
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Orel <[email protected]>
  • Loading branch information
olexii4 committed Oct 31, 2023
1 parent a8820af commit 9aa20ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,7 @@ export async function fetchRegistryMetadata(
throw new DevfileMetaDataIsNotArrayError(location);
}
} catch (e) {
if (
e instanceof DevfileMetaDataIsNotArrayError ||
index === registryIndexLocations.length - 1
) {
if (index === registryIndexLocations.length - 1) {
throw e;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import axios from 'axios';
export async function fetchData<T>(url: string): Promise<T> {
try {
const response = await axios.get<T>(url);
return response.data;
return response?.data;
} catch (e) {
throw new Error(common.helpers.errors.getMessage(e));
}
Expand Down

0 comments on commit 9aa20ef

Please sign in to comment.