#NEWLINE# def build_response( self , func_input , func_output ) : #NEWLINE# #INDENT# if ( func_input . exception is not None ) : #NEWLINE# #INDENT# return Response ( '' , 404 , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# id = func_input [ 'id' ] #NEWLINE# rep = func_output . value #NEWLINE# body = json . dumps ( Representation ( Model ( self . full_model_name ) ) . to_json ( ( id , rep ) ) ) #NEWLINE# return Response ( body , 200 , { #NEWLINE# #INDENT# 'Content-Type' : 'application/json' , #NEWLINE# #UNINDENT# } )