1
0
Fork 0
mirror of https://github.com/sensebox/blockly-app synced 2025-04-18 23:07:32 +02:00

increase compiler timeout to 30sec

needed when including SenseboxMCU.h
This commit is contained in:
Norwin 2019-01-22 14:36:44 +01:00
parent 3faea789cb
commit 24e18b7a3d

View file

@ -18,10 +18,13 @@ export class CompilerProvider {
// send compilation request, returning a job ID
return this.http.post(`${URL}/compile`, data, { headers })
.pipe(timeout(4000))
.pipe(timeout(30000))
.toPromise()
.catch(err => {
let msg = 'unable to contact web compiler. are you online?'
let msg = err.message
if (err.name === 'TimeoutError')
msg = 'unable to contact web compiler. are you online?'
try {
// attempt to extract the compilation error message and clean it up
msg = JSON.parse(err.error.message).process