Why?
- No goroutine-safe context supported.
// old way
bot.PostMessage(msgBody)
// new way
bot.PostMessage(ctx, msgBody)
- Biz errors are not intuitive.
// old way
resp, err := bot.PostMessage(ctx, msgBody)
// Possible returns:
// nil, 0 -> all go well
// http error, resp is nil -> HTTP error
// nil, resp.Code not equals 0 -> Biz Error
// new way
resp, err := bot.PostMessage(ctx, msgBody)
// Possible returns:
// nil, 0 -> all go well
// http error, resp is nil -> HTTP error
// error that wraps resp.Code, resp.Code not equals 0 -> Biz Error
Plan
Why?
Plan