Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .workflows/.build/packages/website/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ FROM node:25-alpine AS base
RUN npm install -g pnpm@10.26.1

# Define build arguments for environment variables
ARG VITE_API_BASE_URL
ARG VITE_WEBSITE_BASE_URL
ARG VITE_API_BASE_URL

# Set environment variables during the build process
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
ENV VITE_WEBSITE_BASE_URL=$VITE_WEBSITE_BASE_URL
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
ENV NODE_OPTIONS="--max-old-space-size=4096"

# Build the repo
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1
1.0.2
15 changes: 15 additions & 0 deletions packages/website/src/utilities/getResponseBodyFromAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ export async function getResponseBodyFromAPI<
signal?: AbortSignal
hasToastMessage?: boolean
}) {
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL
if (!apiBaseUrl) {
console.error(
"VITE_API_BASE_URL is not defined. The request will not be sent. " +
"Make sure the environment variable is set at build time.",
)
return <const>{
ok: false,
data: undefined,
error: new ClientError({
message: "VITE_API_BASE_URL is not defined",
}),
}
}

const abortController = parameters.signal ? undefined : new AbortController()
const signal = parameters.signal ?? abortController!.signal
try {
Expand Down
Loading