Skip to main content

Error Publishing State to RHS When Creating Identity

Question

Why do I encounter an error stating "unexpected status code: 404" when trying to create an identity, specifically while publishing the state to the RHS?

Answer

The error you're experiencing is typically due to an incorrect configuration of ISSUER_CREDENTIAL_STATUS_RHS_MODE and an invalid ISSUER_CREDENTIAL_STATUS_RHS_URL. This occurs when ISSUER_CREDENTIAL_STATUS_RHS_MODE is set to OffChain, but the provided RHS URL is not a valid endpoint.

To resolve this issue, check your .env-issuer file for the ISSUER_CREDENTIAL_STATUS_RHS_MODE value. If it is set to OffChain, you must specify a valid Reverse Hash Service Endpoint in ISSUER_CREDENTIAL_STATUS_RHS_URL. For example, you could use our staging RHS: https://rhs-staging.polygonid.me/.

If your ISSUER_CREDENTIAL_STATUS_RHS_MODE is configured for on-chain operation, ensure you have the correct smart contract information for your network, such as Amoy:

  • ISSUER_CREDENTIAL_STATUS_ONCHAIN_TREE_STORE_SUPPORTED_CONTRACT=0x3d3763eC0a50CE1AdF83d0b5D99FBE0e3fEB43fb
  • ISSUER_CREDENTIAL_STATUS_RHS_CHAIN_ID=80002

Choosing ISSUER_CREDENTIAL_STATUS_RHS_URL=None indicates that the issuer node will handle revocation credential status resolution internally, and no further RHS setup is required.

For a comprehensive understanding and configuration guidance, please review the available revocation status modes. Detailed instructions can be found in the Revocation Status Modes documentation.