Skip to content

Conversation

5eeman
Copy link
Contributor

@5eeman 5eeman commented Jun 19, 2025

Added correct error message for a case when verification request was already verified.

@5eeman 5eeman requested review from martinsaporiti and Copilot June 19, 2025 12:08
@5eeman 5eeman self-assigned this Jun 19, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds handling for cases where a verification request has already been processed, logging an error and returning an error response.

  • Introduces a type check for models.VerificationResponse to detect duplicate verifications
  • Logs an error and returns a 500-style JSON response with message "request already verified"
Comments suppressed due to low confidence (2)

internal/api/server.go:101

  • Using a 500 Internal Server Error for an already verified request may mislead clients; consider returning a 409 Conflict or 400 Bad Request with an appropriate response type to reflect a client-side issue.
		return Callback500JSONResponse{

internal/api/server.go:96

  • There is no existing test coverage for the duplicate verification path; add a unit or integration test to ensure this branch behaves as expected.
	// Check if request is already verified

@5eeman 5eeman merged commit 2ab02eb into develop Jun 20, 2025
2 checks passed
@5eeman 5eeman deleted the feature/request_double_verification branch June 20, 2025 13:02
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

Successfully merging this pull request may close these issues.

2 participants