new react-openapi
This commit is contained in:
@@ -51,7 +51,8 @@ export function AppProvider({ specConfiguration, children }: AppProviderProps) {
|
||||
}
|
||||
} catch (e: any) {
|
||||
if (!cancelled) {
|
||||
setErrors([{ type: "error", message: e.message ?? "Failed to load spec" }]);
|
||||
const lines = (e.message ?? "Failed to load spec").split("\n");
|
||||
setErrors(lines.map((msg: string) => ({ type: "error" as const, message: msg })));
|
||||
}
|
||||
} finally {
|
||||
if (!cancelled) {
|
||||
|
||||
Reference in New Issue
Block a user