Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

ONAP Guidelines

Finally found general ONAP Advise:

...

Status codes should align with IETF's HTTP Status Code Registry: https://www.ietf.org/assignments/http-status-codes/http-status-codes.xml"

Agreed CPS  API(SPI) Exception Hierarchy

(see CCSDK-2871 DP: Long-term Java API(s)

  • CPSValidationException
    • ModelValidationException
      • SpecificException1
      • SpecificException2
    • DataValidationException
      • SpecificException3
      • SpecificException4
    • PathValidationException
      • SpecificException5

*Note we might have to move these 'common' exceptions classes to the SPI just like we did with the common data objects

Vertical slice view of error scenarios


#Use caseScenarioDB Response SPI ResponseJava APIREST API Response CodeREST message
1Add schema set to dataspace

schema set with same name already exists


DataIntegrityViolationExceptionDuplicateSchemaSetException
(extends ModelValidationException)
DuplicateSchemaSetExceptionTBDTBD
2Add schema set to dataspacedataspacename does not existdepends on impl, I assume no records foundDatasspaceNotFoundExceptionDatasspaceNotFoundExceptionTBDTBD
3List anchors for dataspace namedataspacename does not existdepends on impl, I assume no records foundDatasspaceNotFoundExceptionDatasspaceNotFoundException204 ?TBD
4List anchors for dataspace nameno anchor  records in DB0 recordsempty colelctionempty collection200 ? TBD
5







6







7