Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Additional logging for Uniform attachArchieve endpoint #3060

Merged
merged 1 commit into from
Apr 26, 2024
Merged
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
6 changes: 6 additions & 0 deletions api.planx.uk/modules/send/uniform/uniform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,12 @@ async function attachArchive(
const response = await axios.request(attachArchiveConfig);
// successful upload returns 204 No Content without body
const isSuccess = response.status === 204;

// Temp additional logging to debug failures
console.log("*** Uniform attachArchive response ***");
console.log(JSON.stringify(response, null, 2));
console.log("******");
Copy link
Member

@jessicamcinchak jessicamcinchak Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively could we start adding this into what gets written to uniform_applications.response audit record? Don't see any reason we can't concat each response together and push full list rather than just the single response like now? Might be easier to parse/find later than AWS logs? Just a thought though, happy to keep this quick!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep gone for quick here just as I'm certain we're getting an empty 204 response here (the bool for this is already returning to Hasura), just want to check the next attempt really before we go for something more robust 👍


return isSuccess;
}

Expand Down
Loading