Skip to content
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

Handle Ethereum provider errors #517

Closed
Nebulis opened this issue Jul 4, 2020 · 1 comment
Closed

Handle Ethereum provider errors #517

Nebulis opened this issue Jul 4, 2020 · 1 comment

Comments

@Nebulis
Copy link
Contributor

Nebulis commented Jul 4, 2020

In the case of Infura rate limit:

[{"type":"DOCUMENT_INTEGRITY","name":"OpenAttestationHash","data":true,"status":"VALID"},{"name":"OpenAttestationEthereumDocumentStoreIssued","type":"DOCUMENT_STATUS","data":{"issuedOnAll":false,"details":[{"issued":false,"address":"0xdcA6Eea7024151c270b50FcA9E67161119B06BAD","reason":{"message":"Error with smart contract 0xdcA6Eea7024151c270b50FcA9E67161119B06BAD: undefined","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"}}]},"reason":{"message":"Error with smart contract 0xdcA6Eea7024151c270b50FcA9E67161119B06BAD: undefined","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"},"status":"INVALID"},{"status":"SKIPPED","type":"DOCUMENT_STATUS","name":"OpenAttestationEthereumTokenRegistryMinted","reason":{"code":4,"codeString":"SKIPPED","message":"Document issuers doesn't have \"tokenRegistry\" property or TOKEN_REGISTRY method"}},{"name":"OpenAttestationEthereumDocumentStoreRevoked","type":"DOCUMENT_STATUS","data":{"revokedOnAny":true,"details":[{"revoked":true,"address":"0xdcA6Eea7024151c270b50FcA9E67161119B06BAD","reason":{"message":"Error with smart contract 0xdcA6Eea7024151c270b50FcA9E67161119B06BAD: undefined","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"}}]},"reason":{"message":"Error with smart contract 0xdcA6Eea7024151c270b50FcA9E67161119B06BAD: undefined","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"},"status":"INVALID"},{"status":"SKIPPED","type":"ISSUER_IDENTITY","name":"OpenAttestationDnsTxt","reason":{"code":2,"codeString":"SKIPPED","message":"Document issuers doesn't have \"documentStore\" / \"tokenRegistry\" property or doesn't use DNS-TXT type"}},{"type":"ISSUER_IDENTITY","name":"OpencertsRegistryVerifier","status":"VALID","data":[{"status":"VALID","value":"0xdcA6Eea7024151c270b50FcA9E67161119B06BAD","name":"ROPSTEN: Government Technology Agency of Singapore (GovTech)","displayCard":false}]}]

In the case of Cloudflare's random 502 bad request error:

[{"type":"DOCUMENT_INTEGRITY","name":"OpenAttestationHash","data":true,"status":"VALID"},{"status":"SKIPPED","type":"DOCUMENT_STATUS","name":"OpenAttestationSignedProof","reason":{"code":4,"codeString":"SKIPPED","message":"Document does not have a proof block"}},{"name":"OpenAttestationEthereumDocumentStoreIssued","type":"DOCUMENT_STATUS","data":{"issuedOnAll":true,"details":[{"issued":true,"address":"0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f"}]},"status":"VALID"},{"status":"SKIPPED","type":"DOCUMENT_STATUS","name":"OpenAttestationEthereumTokenRegistryMinted","reason":{"code":4,"codeString":"SKIPPED","message":"Document issuers doesn't have \"tokenRegistry\" property or TOKEN_REGISTRY method"}},{"name":"OpenAttestationEthereumDocumentStoreRevoked","type":"DOCUMENT_STATUS","data":{"revokedOnAny":true,"details":[{"revoked":true,"address":"0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f","reason":{"message":"Error with smart contract 0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f: bad response","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"}}]},"reason":{"message":"Error with smart contract 0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f: bad response","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"},"status":"INVALID"},{"status":"SKIPPED","type":"ISSUER_IDENTITY","name":"OpenAttestationDnsTxt","reason":{"code":2,"codeString":"SKIPPED","message":"Document issuers doesn't have \"documentStore\" / \"tokenRegistry\" property or doesn't use DNS-TXT type"}},{"type":"ISSUER_IDENTITY","name":"OpencertsRegistryVerifier","status":"VALID","data":[{"status":"VALID","value":"0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f","name":"Singapore Examinations and Assessment Board","displayCard":true,"website":"https://www.seab.gov.sg/","email":"","phone":"+65 6872 2220","logo":"/static/images/SEAB_logo_crop.png","id":"seab-registry"}]}]

In the case of Cloudflare 429 rate limit error:

[{"type":"DOCUMENT_INTEGRITY","name":"OpenAttestationHash","data":true,"status":"VALID"},{"status":"SKIPPED","type":"DOCUMENT_STATUS","name":"OpenAttestationSignedProof","reason":{"code":4,"codeString":"SKIPPED","message":"Document does not have a proof block"}},{"name":"OpenAttestationEthereumDocumentStoreIssued","type":"DOCUMENT_STATUS","data":{"issuedOnAll":false,"details":[{"issued":false,"address":"0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f","reason":{"message":"Error with smart contract 0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f: bad response","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"}}]},"reason":{"message":"Error with smart contract 0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f: bad response","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"},"status":"INVALID"},{"status":"SKIPPED","type":"DOCUMENT_STATUS","name":"OpenAttestationEthereumTokenRegistryMinted","reason":{"code":4,"codeString":"SKIPPED","message":"Document issuers doesn't have \"tokenRegistry\" property or TOKEN_REGISTRY method"}},{"name":"OpenAttestationEthereumDocumentStoreRevoked","type":"DOCUMENT_STATUS","data":{"revokedOnAny":true,"details":[{"revoked":true,"address":"0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f","reason":{"message":"Error with smart contract 0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f: bad response","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"}}]},"reason":{"message":"Error with smart contract 0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f: bad response","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"},"status":"INVALID"},{"status":"SKIPPED","type":"ISSUER_IDENTITY","name":"OpenAttestationDnsTxt","reason":{"code":2,"codeString":"SKIPPED","message":"Document issuers doesn't have \"documentStore\" / \"tokenRegistry\" property or doesn't use DNS-TXT type"}},{"type":"ISSUER_IDENTITY","name":"OpencertsRegistryVerifier","status":"VALID","data":[{"status":"VALID","value":"0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f","name":"Singapore Examinations and Assessment Board","displayCard":true,"website":"https://www.seab.gov.sg/","email":"","phone":"+65 6872 2220","logo":"/static/images/SEAB_logo_crop.png","id":"seab-registry"}]}]

Edit (20 Aug): Found another interesting response: "missing response"

[{"type":"DOCUMENT_INTEGRITY","name":"OpenAttestationHash","data":true,"status":"VALID"},{"status":"SKIPPED","type":"DOCUMENT_STATUS","name":"OpenAttestationSignedProof","reason":{"code":4,"codeString":"SKIPPED","message":"Document does not have a proof block"}},{"status":"SKIPPED","type":"DOCUMENT_STATUS","name":"OpenAttestationEthereumTokenRegistryStatus","reason":{"code":4,"codeString":"SKIPPED","message":"Document issuers doesn't have \"tokenRegistry\" property or TOKEN_REGISTRY method"}},{"name":"OpenAttestationEthereumDocumentStoreStatus","type":"DOCUMENT_STATUS","data":{"issuedOnAll":false,"details":{"issuance":[{"issued":false,"address":"0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f","reason":{"message":"Error with smart contract 0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f: missing response","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"}}]}},"reason":{"message":"Error with smart contract 0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f: missing response","code":3,"codeString":"ETHERS_UNHANDLED_ERROR"},"status":"INVALID"},{"status":"SKIPPED","type":"ISSUER_IDENTITY","name":"OpenAttestationDnsTxt","reason":{"code":2,"codeString":"SKIPPED","message":"Document issuers doesn't have \"documentStore\" / \"tokenRegistry\" property or doesn't use DNS-TXT type"}},{"type":"ISSUER_IDENTITY","name":"OpencertsRegistryVerifier","status":"VALID","data":[{"status":"VALID","value":"0xE4a94Ef9C26904A02Cd6735F7D4De1D840146a0f","name":"Singapore Examinations and Assessment Board","displayCard":true,"website":"https://www.seab.gov.sg/","email":"","phone":"+65 6872 2220","logo":"/static/images/SEAB_logo_crop.png","id":"seab-registry"}]}]
@gjj gjj changed the title Handle Infura rate limit Handle Ethereum provider errors Aug 6, 2020
@gjj
Copy link
Contributor

gjj commented Sep 2, 2020

This has been fixed in #544

@gjj gjj closed this as completed Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants