Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot] 2026-04-22 22:18:13 +00:00
parent 6749ab0340
commit f0e85697a6

View file

@ -24,10 +24,15 @@ export async function railwayQuery<T>(
if (!res.ok) { if (!res.ok) {
const text = await res.text(); const text = await res.text();
console.error(`Railway HTTP ${res.status} for query:`, query.trim().split("\n")[1]?.trim(), "vars:", JSON.stringify(variables), "body:", text);
throw new Error(`Railway HTTP ${res.status}: ${text}`); throw new Error(`Railway HTTP ${res.status}: ${text}`);
} }
return res.json(); const json = await res.json();
if (json.errors?.length) {
console.error("Railway GraphQL errors:", JSON.stringify(json.errors), "for vars:", JSON.stringify(variables));
}
return json;
} }
export async function createRailwayService(opts: { export async function createRailwayService(opts: {