New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error codes #71

Merged
2 commits merged into from Jul 6, 2014

Conversation

Projects
None yet
1 participant
@a4lg
Contributor

a4lg commented Jul 6, 2014

ErrorCode enum を追加することで、エラーコードの解釈が必要な際に各人が定義する定数リテラルに頼らずエラーの原因が解釈できるようにします。現状の設計では Error.Code 自体は int のままにし、適宜 ErrorCode へのキャストを挟むことを想定しています (ErrorCode の列挙値に無いエラーコードは Enum.IsDefined(typeof(ErrorCode), (ErrorCode)value) が false になることなどで判別可能です)。

TODO (until merge): エラーコード列挙値のネーミングルールの確認

a4lg added some commits Jul 6, 2014

Add undocumented (but well-known) error codes
Some error codes are not listed in:
https://dev.twitter.com/docs/error-codes-responses

But some error codes are well known to exist and exists on some
official documents. This commit adds such error codes to ErrorCode enum.

References:

*	https://dev.twitter.com/docs/auth/application-only-auth
*	https://dev.twitter.com/issues/1429
*	https://dev.twitter.com/discussions/27088
*	https://dev.twitter.com/discussions/14004

ghost pushed a commit that referenced this pull request Jul 6, 2014

@ghost ghost merged commit f39aa22 into CoreTweet:master Jul 6, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@a4lg a4lg deleted the a4lg:feature/error-codes branch Jul 6, 2014

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment