Skip to content

fix: Trim spaces in parameters of the verify presentation API #1185

@sayali-chavan2396

Description

@sayali-chavan2396

Description:
When providing a space before a valid proofId during the verification process, the response returns a 500 error, indicating that the record was not found. The expected behavior is that the space should be trimmed, and the verification should be successful with a 201 response.

Method
POST/v1/orgs/{orgId}/proofs/{proofId}/verify (Verify presentation)

Steps to Reproduce

  1. Make an API call to the 'Verify Presentation' endpoint with a 'proofId' parameter that includes a space before the actual valid proof ID.
  2. Observe the response.

Current behavior

{
"statusCode": 500,
"message": "Something went wrong!",
"error": {
"message": "ProofRecord: record with id 0f02f9d0-a70f-4810-96b0-e12a3846ba70 not found."
}
}

Expected behavior

The space in the proofId should be automatically trimmed, and the response should indicate a successful verification with status code 201
{
"statusCode": 201,
"message": "Proof presentation verified successfully.",
"data": { }
}

Screenshot

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions