Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

How to change format return wrapped error message #226

Open
putrafajarh opened this issue Mar 22, 2020 · 2 comments
Open

How to change format return wrapped error message #226

putrafajarh opened this issue Mar 22, 2020 · 2 comments

Comments

@putrafajarh
Copy link

putrafajarh commented Mar 22, 2020

func (w *withMessage) Error() string { return w.msg + ": " + w.cause.Error() }

how can i change format return error message, to this

func (w *withMessage) Error() string { return w.cause.Error()+ " | " + w.msg }

@puellanivis
Copy link

There is no functionality for this provided. You would have to fork the repo.

@SkippyZA
Copy link

You could also create a decorator for this and implement it in your own code without needing to manage a fork

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants