-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Implement Service, WsgiApp to create nirum rpc service - Add nirum.rpc.WsgiApp, nirum.rpc.Service - Return appropriate error message / success response - Support /ping/ by default - Fix deserializers - deserialize by class not from given data - deserialize generic type(eg. typing.Sequence) as python type - deserialize primitive type
- Loading branch information
1 parent
bc1fb46
commit df60dac
Showing
6 changed files
with
768 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""":mod:nirum.exc` | ||
~~~~~~~~~~~~~~~~~~ | ||
""" | ||
__all__ = ( | ||
'InvalidNirumServiceMethodNameError', | ||
'InvalidNirumServiceMethodTypeError', | ||
'NirumProcedureArgumentError', | ||
'NirumProcedureArgumentRequiredError', | ||
'NirumProcedureArgumentValueError', | ||
'NirumServiceError', | ||
) | ||
|
||
|
||
class NirumServiceError(Exception): | ||
"""Base nirum service error""" | ||
|
||
|
||
class InvalidNirumServiceMethodNameError(ValueError, NirumServiceError): | ||
"""Raised when nirum service has invalid method name.""" | ||
|
||
|
||
class InvalidNirumServiceMethodTypeError(TypeError, NirumServiceError): | ||
"""Raised when nirum service method is not callable.""" | ||
|
||
|
||
class NirumProcedureArgumentError(ValueError, NirumServiceError): | ||
"""WIP""" | ||
|
||
|
||
class NirumProcedureArgumentRequiredError(NirumProcedureArgumentError): | ||
"""WIP""" | ||
|
||
|
||
class NirumProcedureArgumentValueError(NirumProcedureArgumentError): | ||
"""WIP""" |
Oops, something went wrong.