diff options
Diffstat (limited to 'captain/external.f90')
-rw-r--r-- | captain/external.f90 | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/captain/external.f90 b/captain/external.f90 index f5ba409..61184f1 100644 --- a/captain/external.f90 +++ b/captain/external.f90 @@ -718,11 +718,17 @@ contains ! Write the file call write_log("Storing titan file to "//trim(fullpath), LOG_DEBUG) - call req%write_to(fullpath) + if(req%write_to(fullpath)) then - resp%code = GEMINI_CODE_SUCCESS - call resp%set_body_contents(RESPONSE_JSON_OKAY) - resp%body_mimetype = "text/plain" + resp%code = GEMINI_CODE_SUCCESS + call resp%set_body_contents(RESPONSE_JSON_OKAY) + resp%body_mimetype = "text/plain" + + else + + resp%code = GEMINI_CODE_TEMPFAIL + + end if else |