Skip to content

Conversation

@joshwanf
Copy link
Collaborator

Resolves #250 by adding validation/serialization to the relevant endpoints. Invalid requests return a standardized ApiError with a message. For the case where someone creates a Screener while supplying a publishedScreenerId field, the API responds with:

{
  error: true;
  message: "Unknown field 'publishedScreenerId'";
}

ApiError can be used elsewhere to return a response instead of throwing.

@joshwanf joshwanf added this to the Builder API Security milestone Jan 22, 2026
@joshwanf joshwanf requested a review from prestoncabe as a code owner January 22, 2026 20:39
Copy link
Collaborator

@Justin-MacIntosh Justin-MacIntosh left a comment

Choose a reason for hiding this comment

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

Very small changes requested. Thank you for introducing all of these validation concepts!!


public class JsonServerExceptionMappers {

// @ServerExceptionMapper
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove commented code

private static final Logger LOG = Logger.getLogger(ValidationExceptionMapper.class);

@Override
public Response toResponse(ConstraintViolationException e) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: feel free to ignore this change, but I would avoid 1letter variable names likeeorv. In this case I would go with something like excandviolation`.

@prestoncabe prestoncabe removed this from the Builder API Security milestone Feb 12, 2026
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.

Screener API Security

3 participants