We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently the set path parameter in dispatch class is after the loadrequest call :
ClassMethod getTransaction(ref As %String) As %Status { Set sc = $$$OK Try{ Do ##class(%REST.Impl).%SetContentType($Get(%request.CgiEnvs("HTTP_ACCEPT"))) If '##class(%REST.Impl).%CheckAccepts("application/json,application/jose,application/octet-stream,text/vnd.graphviz") Do ##class(%REST.Impl).%ReportRESTError(..#HTTP406NOTACCEPTABLE,$$$ERROR($$$RESTBadAccepts)) Quit Set requestMessage = ##class(Nuts.ApiServer.Network.requests.getTransaction).%New() Do requestMessage.LoadFromRequest(%request) Set scValidateRequest = requestMessage.RequestValidate() If $$$ISERR(scValidateRequest) Do ##class(%REST.Impl).%ReportRESTError(..#HTTP400BADREQUEST,$$$ERROR(5001,"Invalid requestMessage object.")) Quit Set requestMessage.pathref = ref Set response = ##class(Nuts.ApiServer.Network.impl).getTransaction(requestMessage) Do ##class(Nuts.ApiServer.Network.impl).%WriteResponse(response) } Catch(ex) { Do ##class(%REST.Impl).%ReportRESTError(..#HTTP500INTERNALSERVERERROR,ex.AsStatus(),$parameter("Nuts.ApiServer.Network.impl","ExposeServerExceptions")) } Quit sc }
the line:
Set requestMessage.pathref = ref
should be generated before loadFromRequest like this:
Set requestMessage.pathref = ref Do requestMessage.LoadFromRequest(%request)
The text was updated successfully, but these errors were encountered:
move set path parameter before loadFromRequest #36
61436fb
Done.
Sorry, something went wrong.
lscalese
No branches or pull requests
Currently the set path parameter in dispatch class is after the loadrequest call :
the line:
should be generated before loadFromRequest like this:
The text was updated successfully, but these errors were encountered: