Fallback to a fixed list of artifact types
@@ -21,7 +21,11 @@ import { Services } from "src/services";
export class ArtifactTypes {
public static async allTypes(): Promise<string[]> {
+ try {
return (await Services.getAdminService().getArtifactTypes()).map(t => t.name);
+ } catch (e) {
+ return ["AVRO", "PROTOBUF", "JSON", "OPENAPI", "ASYNCAPI", "GRAPHQL", "KCONNECT", "WSDL", "XSD"];
+ }
}
public static async allTypesWithLabels(): Promise<any[]> {
