Comments (3)
One vote for @flexd
from slack.
I beat your dfc to the github registration finish line. Yay for me, but bad
if you were expecting a response. I just wanted to make sure you knew that
@mention didn't hit the right inbox...
On May 8, 2016 12:14, "Kristoffer Berdal" [email protected] wrote:
https://github.com/nlopes/slack/blob/master/admin.go#L21 is a good example
of bad errors.
That returns an error if something goes wrong, or it returns an error if
the API gives a error. How do we differentiate between those two states? I
can't show the API error to a user, because if it's a JSON Unmarshal error
that's not a good idea. And currently the only way of checking would be to
check if the error message contains a string, which is a bad idea.
@dfc https://github.com/dfc has a good set of examples on his blog
http://dave.cheney.net/2016/04/27/dont-just-check-errors-handle-them-gracefully
and has also made a very nice package that fits what he is saying
https://github.com/pkg/errors
What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/nlopes/slack/issues/72
from slack.
Oh, sorry! I'll correct that.
On 9 May 2016 04:50:11 CEST, Douglas Calvert [email protected] wrote:
I beat your dfc to the github registration finish line. Yay for me, but
bad
if you were expecting a response. I just wanted to make sure you knew
that
@mention didn't hit the right inbox...
On May 8, 2016 12:14, "Kristoffer Berdal" [email protected]
wrote:https://github.com/nlopes/slack/blob/master/admin.go#L21 is a good
example
of bad errors.That returns an error if something goes wrong, or it returns an error
if
the API gives a error. How do we differentiate between those two
states? I
can't show the API error to a user, because if it's a JSON Unmarshal
error
that's not a good idea. And currently the only way of checking would be
to
check if the error message contains a string, which is a bad idea.@dfc https://github.com/dfc has a good set of examples on his blog
http://dave.cheney.net/2016/04/27/dont-just-check-errors-handle-them-gracefully
and has also made a very nice package that fits what he is saying
https://github.com/pkg/errorsWhat do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/nlopes/slack/issues/72
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/nlopes/slack/issues/72#issuecomment-217765903
Sent from my Android device with K-9 Mail. Please excuse my brevity.
from slack.
Related Issues (20)
- Webhook Sending Functions Seem to Use the Regular JSON Encoder Which Escapes HTML Characters Unnecessarily HOT 1
- Get Block data from webhook payload
- request for a release cut HOT 2
- Release 0.21.4 breaks slash commands in socket mode
- Slash Command returns "bad_error_message" HOT 7
- file_input feature support in slack-go HOT 2
- Unable to render buttons using slack.Attachment HOT 2
- Receiving no payload on websocket based events HOT 2
- Custom http client Resty retry function does not work
- Not possible to set initial value of RichTextInputBlockElement due to wrong type HOT 1
- bug: Missing `team_id` param HOT 1
- Why doesn't the getFile method return []body HOT 1
- Unable to post messages when in deployment HOT 2
- files.upload is getting deprecated by Slack HOT 1
- Upload Files V2: Ability to upload multiple files in one message HOT 1
- UploadFileV2 uploads incorrectly when using text `Content` parameter
- conversations.history unmarshall bug HOT 1
- AddRemoteFile fails because of token in querystring HOT 4
- Slack Functions HOT 2
- Events API Reconciliation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slack.