Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 5 additions & 0 deletions .changeset/orange-impalas-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@opennextjs/aws": patch
---

Early return when an error gets downplayed
5 changes: 3 additions & 2 deletions packages/open-next/src/adapters/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ const isDownplayedErrorLog = (errorLog: AwsSdkClientCommandErrorLog) =>
export function error(...args: any[]) {
// we try to catch errors from the aws-sdk client and downplay some of them
if (args.some((arg) => isDownplayedErrorLog(arg))) {
debug(...args);
} else if (args.some((arg) => isOpenNextError(arg))) {
return debug(...args);
}
if (args.some((arg) => isOpenNextError(arg))) {
// In case of an internal error, we log it with the appropriate log level
const error = args.find((arg) => isOpenNextError(arg))!;
if (error.logLevel < getOpenNextErrorLogLevel()) {
Expand Down
Loading