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

fix: product categories and collections are not updating due to wrong request type #5

Merged

Conversation

uro
Copy link
Collaborator

@uro uro commented Apr 30, 2023

Hi there! I have noticed that the product categories and collections are not updating properly.

After doing some investigations, I believe this is due to an issue with the wrong request type being used.

Also:

  1. I improved logging a bit as a part of the debugging.
  2. I changed the error type to 500 and improved messaging on the strapi signal error. This is blocking the sync and should be advertised properly.

I am happy to modify or remove logging changes from the PR.

Copy link
Owner

@SGFGOV SGFGOV left a comment

Choose a reason for hiding this comment

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

These are good catches :). Should have spotted them earlier. I liked what you've done with logging

logger.error('Error occur while receiving strapi signal.', {
'error.message': e.message,
});
res.status(500).send('Error occur while receiving strapi signal - ' + e.message);

Check warning

Code scanning / CodeQL

Exception text reinterpreted as HTML

[Exception text](1) is reinterpreted as HTML without escaping meta-characters.
Comment on lines +1625 to +1636
this.logger.error('Error occur while sending request to strapi', {
'error.message': theError,
request: {
url: endPoint || 'none',
data: JSON.stringify(data) || 'none',
method: method || 'none',
},
response: {
body: JSON.stringify(error?.response?.data) ?? 'none',
status: error?.response?.status ?? 'none',
},
});

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This logs sensitive data returned by [an access to password](1) as clear text. This logs sensitive data returned by [an access to password](2) as clear text.
@SGFGOV SGFGOV merged commit ef16ec3 into SGFGOV:master May 1, 2023
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.

2 participants