You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

ONAP Guidelines

Finally found general ONAP Advise:

"The API specification should describe the right HTTP status code to return the client.

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








  • No labels