File tree 3 files changed +23
-8
lines changed
3 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const showHome = computed(() => store.currentContractId === '');
31
31
32
32
<div
33
33
v-if =" !!error"
34
- class =" w-full shrink-0 bg-red-500 px-2 py-1 text-sm text-white"
34
+ class =" max-h-[160px] w-full shrink-0 overflow-y-auto whitespace-pre-wrap bg-red-500 bg-opacity-80 px-2 py-1 text-xs text-white"
35
35
>
36
36
{{ error }}
37
37
</div >
Original file line number Diff line number Diff line change @@ -67,15 +67,29 @@ export function useContractQueries() {
67
67
return mockContractSchema ;
68
68
}
69
69
70
- const result = await genlayer . client ?. getContractSchemaForCode (
71
- contract . value ?. content ?? '' ,
72
- ) ;
73
-
74
- schema . value = result ;
75
-
76
- return schema . value ;
70
+ try {
71
+ const result = await genlayer . client ?. getContractSchemaForCode (
72
+ contract . value ?. content ?? '' ,
73
+ ) ;
74
+
75
+ schema . value = result ;
76
+ return schema . value ;
77
+ } catch ( error : any ) {
78
+ const errorMessage = extractErrorMessage ( error ) ;
79
+ throw new Error ( errorMessage ) ;
80
+ }
77
81
}
78
82
83
+ const extractErrorMessage = ( error : any ) => {
84
+ try {
85
+ const details = JSON . parse ( error . details ) ;
86
+ const message = details . data . error . args [ 1 ] . stderr ;
87
+ return message ;
88
+ } catch ( err ) {
89
+ return error . details ;
90
+ }
91
+ } ;
92
+
79
93
const isDeploying = ref ( false ) ;
80
94
81
95
async function deployContract (
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ const isFinalityWindowValid = computed(() => {
71
71
testId =" input-finalityWindow"
72
72
:disabled =" false"
73
73
class =" w-20"
74
+ tiny
74
75
/>
75
76
</div >
76
77
You can’t perform that action at this time.
0 commit comments