Skip to content

Commit

Permalink
RISDEV-6933 Test code to verify Sentry integration
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-deazevedo committed Feb 28, 2025
1 parent 08b519f commit 1392c86
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import de.bund.digitalservice.ris.adm_vwv.application.DocumentationUnit;
import de.bund.digitalservice.ris.adm_vwv.application.DocumentationUnitPort;
import io.sentry.Sentry;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
Expand Down Expand Up @@ -43,4 +44,15 @@ public ResponseEntity<DocumentationUnit> update(
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}

@GetMapping("api/documentation-units/sentry")
public String sentry() {
try {
throw new Exception("Test to verify sentry integration into backend.");
} catch (Exception e) {
Sentry.captureException(e);
}
return "Test";
}

}

0 comments on commit 1392c86

Please sign in to comment.