gobuffalo / buffalo

Rapid Web Development w/ Go
http://gobuffalo.io
MIT License
8.08k stars 579 forks source link

made panic event to use the same standard payload type #2352

Closed sio4 closed 1 year ago

sio4 commented 2 years ago

What is being done in this PR?

made PanicHandler emits an error event with the standard payload as the same as defaultErrorMiddleware.

Now, stack trace can be accessed by e.Payload["stacktrace"] (previously, we need to assert if e.Payload["data"] is a map, and then use that as asserted["stacktrace"]). It could be a breaking change if someone uses the buggy data structure as is, but I want to say this is a kind of bugfix :-)

(also, updated module dependencies)

What are the main choices made to get to this solution?

Consistent behavior and data structure for all error events, by using the standard payload type.