Skip to content

Commit c66bbf7

Browse files
committed
Fix compile error handling
1 parent 37ad71e commit c66bbf7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export class AtelierAPI {
362362

363363
// Handle any errors
364364
if (data.status.summary !== "") {
365-
// This is a 500 server error or a query request with malformed SQL
365+
// This is a 500 server error, a query request with malformed SQL or a failed compile (which will have a 200 OK status)
366366
throw { statusCode: response.status, message: response.statusText, errorText: data.status.summary };
367367
}
368368
if (data.result.status && data.result.status !== "") {

src/commands/compile.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,8 @@ async function compile(docs: CurrentFile[], flags?: string): Promise<any> {
229229
return docs;
230230
})
231231
.catch((error: Error) => {
232-
outputChannel.appendLine(error.message);
233-
outputChannel.show(true);
234232
if (!config("suppressCompileErrorMessages")) {
235-
vscode.window.showErrorMessage(error.message, "Show details").then((data) => {
233+
vscode.window.showErrorMessage("Compilation failed. Check output channel for details.", "Dismiss").then((data) => {
236234
outputChannel.show(true);
237235
});
238236
}

0 commit comments

Comments
 (0)