Driftwatch

Box / Box Platform API /

Breakingdirection flip: their tools call this safe

code can now return "unprocessable_entity"

What changed

Producer-side tools call this additive. It breaks exhaustive switches, strict parsers and generated client enums.

Affects code on ClientError reachable from 293 operations.

New value: unprocessable_entity.

can now return "unprocessable_entity"

Who is affected

Code that reads Box's ClientError objects, used by 293 Box operations.

Before and after

WhereBeforeAfter
ClientError.code"accepted", "bad_request", "conflict", "created", "forbidden", "insufficient_scope", "internal_server_error", "item_name_invalid", "method_not_allowed", "no_content", "not_found", "not_modified", "precondition_failed", "redirect", "too_many_requests", "unauthorized", "unavailable""accepted", "bad_request", "conflict", "created", "forbidden", "insufficient_scope", "internal_server_error", "item_name_invalid", "method_not_allowed", "no_content", "not_found", "not_modified", "precondition_failed", "redirect", "too_many_requests", "unauthorized", "unavailable", "unprocessable_entity"
ConflictError.code"accepted", "bad_request", "conflict", "created", "forbidden", "insufficient_scope", "internal_server_error", "item_name_invalid", "method_not_allowed", "no_content", "not_found", "not_modified", "precondition_failed", "redirect", "too_many_requests", "unauthorized", "unavailable""accepted", "bad_request", "conflict", "created", "forbidden", "insufficient_scope", "internal_server_error", "item_name_invalid", "method_not_allowed", "no_content", "not_found", "not_modified", "precondition_failed", "redirect", "too_many_requests", "unauthorized", "unavailable", "unprocessable_entity"

Code that breaks

switch (response.code) {
  // existing branches …
  // no branch for "unprocessable_entity"
  default:
    throw new Error("unexpected code");
}

Based on Box’s published API specification. How severity is decided.