Describe your bug or feature request.

Availability checkers can return availability result objects specifying a "reason" for why a given order item is unavailable.

I'm suggesting we allow returning a "code" as well.
The code could be an integer, or a "string", don't really want to be super strict about it...

For reference, also created a core issue to ensure violation codes are returned by JSON API (See #3274805: Update the UnprocessableHttpEntityExceptionNormalizer to support returning violation codes).

Also changed the "reason" param type to "mixed", since we accept strings and markup interfaces...

CommentFileSizeAuthor
#2 3274829-2.patch3.1 KBjsacksick
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jsacksick created an issue. See original summary.

jsacksick’s picture

Status: Active » Needs review
FileSize
3.1 KB

  • jsacksick committed 40e90a4 on 8.x-2.x
    Issue #3274829 by jsacksick: Allow availability results to return a code...

  • jsacksick committed 5919e82 on 3.0.x
    Issue #3274829 by jsacksick: Allow availability results to return a code...
jsacksick’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.