YuryShkoda
f84af4ac06
fix(api): return prompt error response instead of hanging when a SAS session fails
...
The SAS-runtime poll loop in processProgram only checked for
SessionState.completed, so a session that failed (e.g. via %abort;)
left the loop spinning on delay(50) forever - the request never
resolved, even though the SAS log had already been written. Split a single completed-on-either-outcome
flag into separate completed/failed states without updating this loop.
- processProgram now throws when session.state becomes 'failed'
- Execution.ts catches that, reads the complete log (guaranteed
complete since the session's process has already exited by then),
and throws a SessionExecutionError carrying it
- stp.ts/code.ts surface { ..., log } in the HTTP error response
- add unit tests for the poll loop and the log-enrichment logic, plus
a mock SAS executable + end-to-end test exercising the real
session/process pipeline without needing a SAS install
- add docs/diagrams covering the session lifecycle and the SAS
execution handshake mechanism, for future context
2026-07-13 13:46:36 +03:00
Yury
bc2cff1d0d
chore(api): updated trigger endpoints description
2024-10-31 15:30:32 +03:00
Yury
66aa9b5891
chore(api): updated trigger endpoints description
2024-10-31 15:20:35 +03:00
Yury
03670cf0d6
chore(swagger): fixed code/stp trigger examples
2024-10-30 15:25:03 +03:00
Yury
5cda9cd5d8
feat(api): enabled query params in stp/trigger endpoint
2024-10-30 09:39:47 +03:00
Yury
deee34f5fd
chore(stp): removed query logic from trigger endpoint
2024-10-29 16:55:40 +03:00
Yury
b0723f1444
feat(stp): added trigger endpoint
2024-10-29 16:27:53 +03:00
Yury
049a7f4b80
chore(swagger): improved description
2024-10-29 12:02:26 +03:00
Allan
41c627f93a
chore: lint fix
2023-08-07 19:39:02 +01:00
Allan Bowe and GitHub
b57dfa429b
Update stp.ts
2023-08-07 19:30:09 +01:00
sabhas
9586dbb2d0
fix: add _debug as optional query param in swagger apis for GET stp/execute
2023-08-07 22:01:52 +05:00
Yury Shkoda
d458b5bb81
chore: cleanup
2023-05-03 10:56:17 +03:00
Yury Shkoda
a17814fc90
chore(stp): removed redundant argument
2023-05-02 15:53:13 +03:00
Yury Shkoda
9aaffce820
fix(execute): fixed adding print output
2023-05-02 15:49:44 +03:00
Yury Shkoda
e78f87f5c0
fix(execute): added atribute indicating stp api
2023-05-02 15:18:05 +03:00
sabhas
112431a1b7
fix: update the response header of request to stp/execute routes
2022-11-27 21:57:26 +05:00
sabhas
6f5566dabb
chore: lint fix
2022-09-21 22:29:50 +05:00
munja
a810f6c7cf
chore(docs): updating swagger definitions
2022-09-21 11:08:12 +01:00
munja
1092a73c10
chore(docs): updating API docs
2022-09-20 12:20:50 +01:00
sabhas
98ea2ac9b9
fix: update response of /SASjsApi/stp/execute and /SASjsApi/code/execute
2022-08-19 15:06:39 +05:00
sabhas
23b6692f02
fix: code/execute controller logic to handle different runtimes
2022-06-17 20:01:50 +05:00
sabhas
53854d0012
fix: code fixes for executing program from program path including file extension
2022-06-15 16:18:07 +05:00
Saad Jutt
c830f44e29
chore: code fixes
2022-06-14 16:48:58 +05:00
sabhas
5df619b3f6
fix: pass _program to execute file without extension
2022-06-03 17:24:29 +05:00
Saad Jutt
2a7223ad7d
feat(api): added autoexec + major type setting changes
2022-05-24 21:12:32 +05:00
Saad Jutt
80b33c7a18
fix: issue174 + issue175 + issue146
2022-05-23 19:24:56 +05:00
Saad Jutt
636301e664
fix: reqHeadrs.txt will contain headers to access APIs
2022-05-08 02:49:16 +05:00
Saad Jutt
117a53ceea
fix(session): increased session + bug fixed
2022-03-24 20:22:06 +05:00
Saad Jutt
dd56a95314
fix(stp): use same session from file upload
2022-03-24 18:06:28 +05:00
Saad Jutt
145ac45036
fix(stp): return plain/text header for GET & debug
2022-03-14 04:42:30 +05:00
Saad Jutt
da375b8086
chore: lint fixes
2022-02-26 02:41:55 +05:00
Allan Bowe
7312763339
fix: updating docs
2022-02-22 19:35:58 +00:00
Saad Jutt
5005f203b8
fix(stp): return json for webout
2022-02-21 04:13:04 +05:00
Saad Jutt
ef41691e40
fix(file): fixes response headers
2022-02-20 06:18:44 +05:00
Saad Jutt
3e6234e601
fix: return buffer in case of file response
2022-02-20 05:40:03 +05:00
Saad Jutt
c5ad72c931
feat: parse log to array
2022-02-20 04:50:09 +05:00
Saad Jutt
e2a6810e95
fix: code api is updated return type
2022-02-20 02:57:45 +05:00
Saad Jutt
0b5f958f45
fix: minor changes
2022-02-18 08:03:01 +05:00
Saad Jutt
da899b90e2
fix: added http headers to /code api as well
2022-02-18 07:25:48 +05:00
Saad Jutt
2c4aa420b3
feat: set response headers provded by SAS Code execution
2022-02-18 07:22:11 +05:00
Yury Shkoda
bf5767eadf
feat(stp-execution): add returnLog option to execution query
2022-02-10 09:06:29 +03:00
Saad Jutt
e1eb04494a
fix: updated route for sas code
2021-12-21 12:36:58 +05:00
Saad Jutt
27129a8921
feat(studio): run selected code + open in studio
2021-12-16 12:14:32 +05:00
Saad Jutt
43545fa04b
chore: added check session + code refactor
2021-12-05 08:17:54 +05:00
Allan Bowe
b97523e555
fix: sending _webout as result object in response JSON
2021-11-18 20:57:56 +00:00
Saad Jutt
b75139dda5
feat: compile systemInit and inject to autoExec
2021-11-18 03:12:05 +05:00
Saad Jutt
f030aa1516
chore: bug fixes for session crash details + return code
2021-11-15 21:30:12 +05:00
Saad Jutt
f2e50eb4cc
refactor: specs + cleanup
2021-11-14 00:48:22 +05:00
Saad Jutt
04a8626570
chore: additional param for stp/execute + desktop user in req
2021-11-13 16:20:51 +05:00
Saad Jutt
cfdb67a049
chore: docs bug fixed
2021-11-13 00:41:02 +05:00