File tree 2 files changed +5
-27
lines changed
export/projects/sample-project/databases/hr_prod
2 files changed +5
-27
lines changed Original file line number Diff line number Diff line change @@ -49,44 +49,22 @@ jobs:
49
49
local data="$3"
50
50
local description="$4"
51
51
52
- echo "=== DEBUG: API Call Details ==="
53
- echo "Description: $description"
52
+ echo "Calling API: $description"
54
53
echo "URL: $url"
55
- echo "Method: $method"
56
- echo "Data: $data"
57
54
58
55
temp_file=$(mktemp)
59
- http_code=$(curl -v - s -w "%{http_code}" \
56
+ http_code=$(curl -s -w "%{http_code}" \
60
57
--request "$method" "$url" \
61
58
--header "Authorization: Bearer ${{ steps.bytebase-login.outputs.token }}" \
62
59
--header "Content-Type: application/json" \
63
60
--data "$data" \
64
- -o "$temp_file" 2>&1 )
61
+ -o "$temp_file")
65
62
66
- echo "=== DEBUG: Response Details ==="
67
- echo "HTTP Status: $http_code"
68
- echo "Response body:"
63
+ echo "Response (Status $http_code):"
69
64
cat "$temp_file"
70
- echo "=========================== "
65
+ echo "------------------------ "
71
66
72
67
if [[ $http_code -lt 200 || $http_code -ge 300 ]]; then
73
- echo "Error: Failed $description. Status: $http_code"
74
- cat "$temp_file"
75
- rm "$temp_file"
76
- return 1
77
- fi
78
-
79
- if [[ ! -s "$temp_file" ]]; then
80
- echo "Error: Empty response from server"
81
- rm "$temp_file"
82
- return 1
83
- fi
84
-
85
- # Simple one-line JSON validation
86
- if ! python3 -c "import json,sys; json.load(open('$temp_file'))" 2>/dev/null; then
87
- echo "Error: Invalid JSON response"
88
- echo "Response content:"
89
- cat "$temp_file"
90
68
rm "$temp_file"
91
69
return 1
92
70
fi
File renamed without changes.
You can’t perform that action at this time.
0 commit comments