errsole / errsole.js

Collect, Store, and Visualize Logs with a Single Module
MIT License
243 stars 47 forks source link

Avoid returning custom error messages from the API #82

Closed venki91 closed 1 month ago

venki91 commented 3 months ago

Avoid returning custom error messages from the API. Instead, return the error message provided by the storage module, e.g., err.message.

venki91 commented 3 months ago

Check the files here: https://github.com/errsole/errsole.js/tree/master/lib/main/server/controllers

oscarArismendi commented 1 month ago

Hi @venki91,

I'd like to work on the issue you raised about avoiding custom error messages. The solution involves replacing the current custom error messages with error.message from the storage module, as per your request.

For example, in the getSlackDetails function, I would change:

Before:

message: 'An unexpected error occurred'

To:

message: error.message

This pattern will be applied consistently across all relevant functions in the controllers link that you provide. If you approve, I can start making these changes.

Best regards, Oscar Arismendi

venki91 commented 1 month ago

Hi @oscarArismendi ,

Please go a head! Thanks for contributing.