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
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,16 @@ const { action, loader } = createActionApiRoute(
{ status: 200 }
);
} catch (error) {
logger.error("Failed to complete waitpoint token", { error });
// Re-throw Response objects (intentional HTTP responses like the 404 above) so the
// client gets the correct status code instead of a 500, and we don't log them as errors.
if (error instanceof Response) throw error;

logger.error("Failed to complete waitpoint token", {
error:
error instanceof Error
? { name: error.name, message: error.message, stack: error.stack }
: error,
});
throw json({ error: "Failed to complete waitpoint token" }, { status: 500 });
}
}
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/app/v3/marqs/sharedQueueConsumer.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ export class SharedQueueConsumer {
(!retryingFromCheckpoint &&
!EXECUTABLE_RUN_STATUSES.withoutCheckpoint.includes(existingTaskRun.status))
) {
logger.error("Task run has invalid status for execution. Going to ack", {
logger.warn("Task run has invalid status for execution. Going to ack", {
queueMessage: message.data,
messageId: message.messageId,
taskRun: existingTaskRun.id,
Expand Down
Loading