fix: show an error when pre-request script fails (#1991)

* fix: show an error when pre-request script fails

* refactor: minor ui improvements

Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
This commit is contained in:
Andrius Petrauskis
2021-12-02 19:44:26 +02:00
committed by GitHub
parent cc81242294
commit d24d07e420
36 changed files with 112 additions and 6 deletions

View File

@@ -42,7 +42,7 @@ const getTestableBody = (res: HoppRESTResponse & { type: "success" }) => {
}
export const runRESTRequest$ = (): TaskEither<
string,
string | Error,
Observable<HoppRESTResponse>
> =>
pipe(

View File

@@ -21,6 +21,10 @@ export type HoppRESTResponse =
req: HoppRESTRequest
}
| {
type: "script_fail"
error: Error
}
| {
type: "success"
headers: { key: string; value: string }[]