Skip to content

Conversation

@hanoak20
Copy link
Contributor

No description provided.

}

if (err)
return {
Copy link
Contributor

Choose a reason for hiding this comment

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

you do not need to return from try block, throw is suffice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, Actually we don't need to throw it. Because:

  1. It's a proxy request from contentstack to user.
  2. In our error middleware we cannot throw an error with an object, we're throwing message with status.

fileName
);

return {
Copy link
Contributor

Choose a reason for hiding this comment

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

return not needed from try

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, Actually we don't need to throw it. Because:

  1. It's a proxy request from contentstack to user.
  2. In our error middleware we cannot throw an error with an object, we're throwing message with status

@himanshu-contentstack himanshu-contentstack merged commit bf39d03 into dev Feb 20, 2024
@umeshmore45 umeshmore45 deleted the feature/prefix branch June 2, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants