Skip to content

Commit

Permalink
fix api playground that was short circuiting too early
Browse files Browse the repository at this point in the history
  • Loading branch information
RohinBhargava committed Dec 19, 2024
1 parent 760f1a5 commit a153718
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/ui/fern-docs-server/src/ApiDefinitionLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,6 @@ export class ApiDefinitionLoader {
// }

const latest = await this.#getClient().api.latest.getApiLatest(this.apiDefinitionId);
if (!latest.ok) {
if (latest.error.error === "ApiDoesNotExistError") {
return undefined;
} else {
// eslint-disable-next-line no-console
console.error(latest?.error?.content);
throw new Error("Failed to load API definition");
}
}
if (latest.ok) {
return latest.body;
}
Expand Down

0 comments on commit a153718

Please sign in to comment.