Skip to content

Conversation

@Evalir
Copy link
Member

@Evalir Evalir commented Jul 1, 2025

Closes ENG-1165

Copy link
Member Author

Evalir commented Jul 1, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

StatusCode::BAD_REQUEST,
Json(ApiError {
error: "INVALID_HEADER_ENCODING",
message: "Invalid header encoding",
Copy link
Member

@prestwich prestwich Jul 1, 2025

Choose a reason for hiding this comment

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

Some Hint: text in the human-readable strings would be great, re: expectations., what header is missing/invalid, and what does a valid one look like?

for next one,
why was permission denied?

Copy link
Member Author

Choose a reason for hiding this comment

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

these are user facing API errors. I thought we wanted to be opaque here?

Copy link
Member

Choose a reason for hiding this comment

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

we dont want to leak server internals by returning unmodified error objects that may contain things like stack traces. we do want to make them usefuk and helpful

return Ok(ApiError::permission_denied().into_response());
}

info!(%sub, current_slot = %this.builders.calc().current_slot(), "builder permissioned successfully");
Copy link
Member

Choose a reason for hiding this comment

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

same questions

}
},
None => {
error!("builder request missing header");
Copy link
Member

Choose a reason for hiding this comment

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

this is probably not error, as it is not a problem with our system

}
Err(_) => {
return Ok((StatusCode::BAD_REQUEST, "invalid header").into_response());
error!("builder request has invalid header encoding");
Copy link
Member

Choose a reason for hiding this comment

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

this is probably not error, as it is not a problem with our system

@Evalir Evalir force-pushed the evalir/permissioning-tower-layer branch from 2b9d2d9 to 91c4c4e Compare July 1, 2025 19:47
@Evalir Evalir force-pushed the evalir/permissioning-tower-layer branch from 0f671dc to 0dcec62 Compare July 1, 2025 20:25
@Evalir Evalir requested a review from prestwich July 1, 2025 20:26
@Evalir Evalir marked this pull request as ready for review July 1, 2025 20:26
@Evalir Evalir merged commit e17be44 into main Jul 1, 2025
7 checks passed
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.

3 participants