Skip to content

Commit fbf84ae

Browse files
committed
Say why a timestamp was rejected, not just that it was
A value like 2026-08-03T09:15:00 is valid ISO 8601 but rejected here for lacking an offset; the error now states the actual requirement and shows accepted examples. Copilot review follow-up.
1 parent 55c2877 commit fbf84ae

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/controllers/issue_datetimes_controller.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ def parse_timestamp(value)
116116
end
117117

118118
def render_parse_error(param)
119-
render json: {errors: ["#{param} must be an ISO 8601 timestamp"]}, status: :unprocessable_entity
119+
render json: {
120+
errors: ["#{param} must be an ISO 8601 timestamp with a UTC offset, " \
121+
'for example 2026-08-03T09:15:00+09:00 or 2026-08-03T00:15:00Z']
122+
}, status: :unprocessable_entity
120123
end
121124

122125
def issue_payload(issue)

0 commit comments

Comments
 (0)