Mismatch parameter with specification file when reporting error

Bug #1930647 reported by YaoYudie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Low
Unassigned

Bug Description

Accroding to the standard and RFC file, "status" and "detail" should be included in the response body when reporting HTTP error, However, Tacker return a response body without the necessary parameters and its response body is as followed:

 "body": {
      "Bad Request": {
      "code": 400,
      "message": "Rule 'eq,onboardingState,ONBOARDD' contains data type 'enum' with invalid value. It should be one of CREATED,UPLOADING,PROCESSING,ONBOARDED" }}

References:
RFC file : https://datatracker.ietf.org/doc/html/rfc7807#section-3.1
Spectifiaction file : https://docbox.etsi.org/ISG/NFV/Open/Publications_pdf/Specs-Reports/NFV-SOL%20013v2.6.1%20-%20GS%20-%20Common%20aspects%20of%20RESTful%20MANO%20APIs%20Rel%202.pdf

YaoYudie (yaoyudie)
description: updated
Ying Yao (yaoying)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tacker/+/795008

Changed in tacker:
status: New → In Progress
Yasufumi Ogawa (yasufum)
Changed in tacker:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/795008
Committed: https://opendev.org/openstack/tacker/commit/646554075e86e309e7c93a8d5d0120e18db9fca3
Submitter: "Zuul (22348)"
Branch: master

commit 646554075e86e309e7c93a8d5d0120e18db9fca3
Author: Yi Feng <email address hidden>
Date: Mon Jun 7 09:51:06 2021 +0900

    Fix required attributes when error happened

    Accroding to the NFV-SOL 013v2.6.1 Section 6, modify the API's
    response body format when error happened.

    Add title, status and detail attributes and delete problem type,
    code and message attributes in the response body when error happened.
    And also change the "Content-Type" from "application/json" to
    "application/problem+json".

    Closes-Bug: #1930647
    Change-Id: Ic5f08ca924d14a382baeb77470aa3430e317315f

Changed in tacker:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 6.0.0.0rc1

This issue was fixed in the openstack/tacker 6.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.