@andersonalmeidax0/webcomponents 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RestAPIAdapter.js +5 -5
- package/jzcomponents/ErrorCard.jsx +3 -3
- package/package.json +1 -1
- package/releasenotes.txt +1 -1
package/RestAPIAdapter.js
CHANGED
|
@@ -143,14 +143,14 @@ class RestAPIAdapter {
|
|
|
143
143
|
if (!response.ok) {
|
|
144
144
|
alert("callapi staatu:"+response.status)
|
|
145
145
|
r = await this.getJSONResponse(response);
|
|
146
|
-
alert("callapi ret err:"+
|
|
146
|
+
alert("callapi ret err:"+(r));
|
|
147
147
|
if (response.status === 404)
|
|
148
|
-
throw new PlatAPIDBNotFound(`An error has occured: ${response.status}`+' message:'+
|
|
148
|
+
throw new PlatAPIDBNotFound(`An error has occured: ${response.status}`+' message:'+(r));
|
|
149
149
|
if (response.status === 403)
|
|
150
|
-
throw new PlatAPIForbidden(`An error has occured: ${response.status}`+' message:'+
|
|
150
|
+
throw new PlatAPIForbidden(`An error has occured: ${response.status}`+' message:'+(r));
|
|
151
151
|
if (response.status === 401)
|
|
152
|
-
throw new PlatAPIAuthError(`An error has occured: ${response.status}`+' message:'+
|
|
153
|
-
throw new PlatAPIReturnCodeError(`An error has occured: ${response.status}`+' message:'+
|
|
152
|
+
throw new PlatAPIAuthError(`An error has occured: ${response.status}`+' message:'+(r));
|
|
153
|
+
throw new PlatAPIReturnCodeError(`An error has occured: ${response.status}`+' message:'+(r));
|
|
154
154
|
}
|
|
155
155
|
r = await this.getJSONResponse(response);
|
|
156
156
|
|
|
@@ -4,9 +4,9 @@ export class ErrorCard extends React.Component {
|
|
|
4
4
|
render() {
|
|
5
5
|
return (
|
|
6
6
|
<div className="g--10 m--2">
|
|
7
|
-
<h3>Erro de sistema inesperado. Entre em contato com suporte e informe a mensagem abaixo:</h3
|
|
8
|
-
<h4>Error name:{(this.props.myException.name)}</h4
|
|
9
|
-
<h4>Error message:{(this.props.myException.message)}</h4
|
|
7
|
+
<h3>Erro de sistema inesperado. Entre em contato com suporte e informe a mensagem abaixo:</h3><hr/>
|
|
8
|
+
<h4>Error name:{(this.props.myException.name)}</h4><hr/>
|
|
9
|
+
<h4>Error message:{(this.props.myException.message)}</h4><hr/>
|
|
10
10
|
<h4>Error Stack:{(this.props.myException.stack)}</h4>
|
|
11
11
|
</div>
|
|
12
12
|
);
|
package/package.json
CHANGED