codecrafters-io / build-your-own-redis

Definition for the redis challenge.
https://app.codecrafters.io/courses/redis/overview
MIT License
108 stars 30 forks source link

Improve error message for message length mismatch #131

Closed rohitpaulk closed 4 months ago

rohitpaulk commented 5 months ago

Screenshot_2024-02-22_at_10 20 31_PM

Instead of just saying "Length mismatch", let's say:

Expected 28 bytes, received 24 bytes
Expected: ....
Received: ... 

We might also be able to re-use https://github.com/codecrafters-io/tester-utils/blob/master/bytes_diff_visualizer/bytes_diff_visualizer.go in some way, but probably not needed here since there's no non-ascii characters involved

linear[bot] commented 5 months ago

CC-1040 Improve error message for message length mismatch

rohitpaulk commented 5 months ago

Thanks to @b14cknc0d3 for reporting this!

ryan-gang commented 4 months ago

Should be fixed.