megaease / easeprobe

A simple, standalone, and lightweight tool that can do health/status checking, written in Go.
Apache License 2.0
2.18k stars 231 forks source link

Escape SLA status text for compatibility with notification services s… #472

Closed samanhappy closed 10 months ago

samanhappy commented 10 months ago

As mentioned in issue #468 , when sending SLA notifications, the Lark notification service will generate the following response:

code [9499] - msg [Bad Request])

This is because the SLAStatusText content contains \t which is not compatible with Lark.

This PR is a quick fix, the best way is to define content struct as demonstrated in PR #469, which needs a complete refactor and testing work.

codecov-commenter commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (dcd5dd5) 98.99% compared to head (db43344) 99.09%. Report is 1 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #472 +/- ## ========================================== + Coverage 98.99% 99.09% +0.09% ========================================== Files 85 83 -2 Lines 5844 5825 -19 ========================================== - Hits 5785 5772 -13 + Misses 44 40 -4 + Partials 15 13 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.