Skip to content
This repository was archived by the owner on Mar 3, 2022. It is now read-only.

Use ErrorResponse to get error_description. #1075

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/JsonService.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import { Log } from './Log.js';
import { Global } from './Global.js';
import { ErrorResponse } from "./ErrorResponse.js";

export class JsonService {
constructor(
Expand Down Expand Up @@ -158,7 +159,7 @@ export class JsonService {
var payload = JSON.parse(req.responseText);
if (payload && payload.error) {
Log.error("JsonService.postForm: Error from server: ", payload.error);
reject(new Error(payload.error));
reject(new ErrorResponse(payload));
return;
}
}
Expand Down