hbp_nrp_backend package¶
This package contains the python code to run the REST server.
It leverages the Flask REST and Flask-restful frameworks.
-
exception
hbp_nrp_backend.NRPServicesClientErrorException(message, error_type='Client error', error_code=400)[source]¶ Bases:
hbp_nrp_backend.NRPServicesGeneralExceptionException class for client (4xx) errors. It can be used to return meaningful messages to the ExD frontend.
- Parameters
message – message displayed to the end user.
error_code – The HTTP error code to send to the frontend.
-
exception
hbp_nrp_backend.NRPServicesGeneralException(message, error_type, error_code=500, data=None)[source]¶ Bases:
ExceptionGeneral exception class that can be used to return meaningful messages to the ExD frontend.
- Parameters
message – message displayed to the end user.
error_type – Type of error (like ‘Loading Error’)
error_code – The HTTP error code to send to the frontend.
-
exception
hbp_nrp_backend.NRPServicesStateException(message)[source]¶ Bases:
hbp_nrp_backend.NRPServicesGeneralExceptionState exception class that can be used to return meaningful messages to the HBP frontend.
- Parameters
message – message displayed to the end user.
-
exception
hbp_nrp_backend.NRPServicesWrongUserException(message='You need to be the simulation owner to apply your changes or the simulation should be shared with you for you to be able to access it.Wrong user')[source]¶ Bases:
hbp_nrp_backend.NRPServicesClientErrorExceptionException class that can be used to return meaningful messages to the HBP frontend in case an invalid user is detected.
- Parameters
message – message displayed to the end user.